Page 1 of 21
4/5/2015
1
Vishnu Institute of technology – Website: www.vishnu.edu.in
JSP
[Java Server Pages]
Vishnu Institute of technology – Website: www.vishnu.edu.in
Introduction
• JSP (Java Server Pages) is a server-side
technology like Servlets to generate dynamic
web pages based on client requests.
• JSP is a high level abstraction of servlets.
• JSP can be seen as Java code embedded in
HTML code, whereas servlet is HTML code
embedded in Java code.
Page 2 of 21
4/5/2015
2
Vishnu Institute of technology – Website: www.vishnu.edu.in
Introduction (cont...)
• JSP pages are executed by a program known as web
container or jsp container.
• A JSP page is internally converted to a servlet by the
server. That servlet processes the client request.
• JSP supports rapid development of database
applications.
• JSP is web server independent and platform
independent.
Vishnu Institute of technology – Website: www.vishnu.edu.in
Introduction (cont...)
• JSP separates the dynamic content from the
static HTML content. So, a HTML developer
can work with HTML and a JSP developer
can include JSP code at a later point in time.
• Extension of a JSP page is .jsp.
• JSP is built on top of Servlet API.
Page 3 of 21
4/5/2015
3
Vishnu Institute of technology – Website: www.vishnu.edu.in
Disadvantages of Servlets
• Servlet contains both business logic (java
code) and presentation logic (HTML).
• Difficult for maintaining web applications.
• Takes more time for development.
Vishnu Institute of technology – Website: www.vishnu.edu.in
JSP Container or JSP Engine
• JSP container is a program (special servlet)
which forwards the jsp page request to a
servlet container.