This document discusses Java Server Pages (JSP) engines and how they work. It explains that JSP engines allow web servers to process JSP pages by converting JSP code and elements into servlets. When a request comes in for a JSP page, the web server forwards it to the JSP engine. The JSP engine compiles the page into a servlet class, executes it, and returns the dynamic HTML output to the web server as an HTTP response to the client. This allows JSP to generate dynamic web pages using Java code for better portability compared to technologies like ASP.
3. Introduction Of JSP:
JSP- Java Servlet Pages
The Java Servlet Pages is a technology for
developing webpages That supports dynamic content.
4. JSP ENGINES:
• The webserver needs a jsp engine.
• A container to process jsp pages.The jsp container is
responsible for intercepting requests for jspb pages. This is
makes Use of apache which has built in jsp container to
support jsp pages development.
• A jsp container works with the webserver to provide the
runtime environment and other services a jsp needs.
5.
6. JSP PROCESSING:
1.As with a normal page,your browser sends an HTTP request to the
webserver.
2.The webserver recognizes that the HTTP request is for a jsp page and
forwards it to a JSP engine.This is done by using the URL or JSP page which
ends with .jsp instead of .html
3.The jsp engine Loads the jsp page from disk and converts it into a servlet
content.This conversion is very simple in which all template text is converted to
println()statement and all jsp elements are converted to java code. This code
implements the corresponding dynamic behaviour of the page.
7. 4. The jsp engines compiles the servlet into an executable class and forwards
the original request to a servlet engine.
5.A part of the webserver called the servlet engine loads the servlet class and
executes it.During execution, the servlet produces an output in html
format.The output is further passed o to the webserver by the servlet engine
inside an http response.
6.The webserver forwards the HTTP response to your browser in Terms Of
static HTML content.
7.Finally,The webrowser handles the dynamically generated html page inside
the http response exactly as if it were a static page.
8.
9. Advantages Of JSP:
Active server pages(ASP):
The advantage of jsp are twofold.
1.The dynamic part is written in java, not visuval basic or other ms specific
language,so it,is more powerful & easier to use.
2.it’s portable to other operating system & non Microsoft webserver.
Pure Servlet:
It’s More convenient to write regular,html than to have plenty of println
statement that generate the HTML.