basic introduction,architecture,life-cycle, difference b/w jsp and servlets and advantages and disadvantages of jsp.
For more information:-
ishan khan
email:- ishan0214@gmail.com
2. Contents
• Introduction.
• JSP Architecture.
• JSP Execution Procedure.
• JSP Life-cycle.
• JSP Vs Servlets.
• Advantages of JSP.
• Disadvantages of JSP.
• References.
3. Introduction :What is JSP?
• Java Server Pages or as is normally called JSP is a Java based
technology that simplifies the developing of dynamic web
sites.
• It is a technology developed by Sun Microsystems, back in
1999.
• JSP pages are HTML pages with embedded code that allows
to access data from Java code running on the server.
• JSP contains an extension of .jsp
• JSP is used for UI/Front end/display purpose.
4. JSP Architecture
• Java Server Pages are part of a 3-tier architecture. A
server(generally referred to as application or web server)
supports the Java Server Pages. This server will act as a
mediator between the client browser and a database.
7. JSP VS SERVLETS
JSP ServletS
JSP is a webpage scripting language that
can generate dynamic content.
Servlets are Java programs that are
already compiled which also creates
dynamic web content.
JSP run slower compared to Servlet as it
takes compilation time to convert into
Java Servlets.
Servlets run faster compared to JSP.
It’s easier to code in JSP than in Java
Servlets.
Its little much code to write here.
In MVC, jsp act as a view. In MVC, servlet act as a controller.
JSP are generally preferred when there is
not much processing of data required.
servlets are best for use when there is
more processing and manipulation
involved.
8. Advantages of JSP
• User need not write HTML and JAVA code separately.
• JSP can be used for both front end and for writing business
logic.
• JSP is dynamic compilation, which means when a JSP is
modified, it need not be compiled and restarted in the web
server. After the modification of JSP, refresh the browser,
changes will be reflected.
• JSP is Efficient: Every request for a JSP is handled by a
simple Java thread.
• JSP is Scalable: Easy integration with other backend services.
9. • As JSP pages are translated to servlets and compiled, it is
difficult to trace errors occurred in JSP pages.
• JSP pages require double the disk space to hold the JSP page.
• JSP pages require more time when accessed for the first time
as they are to be compiled on the server.
Disadvantages of JSP