Pr.Pg Next Pg

Architecture of JSP tutorials

  • JSP are built on top of Sun Microsystems servlet technology. JSP are essential an HTML page with special JSP tags embedded.

  • This JSP tag contain Java code, the JSP file have extension .jsp, JSP engine parses the .jsp file and convert into Java servlet source file which then compiles into class file, this process is done for the first time when JSP page is accessed.

  • Due to the above compilation process JSP pages take long time to load for the first time and after that you access any time the page will be loaded faster.

 

Architecture of JSP

 

 

  • Below are the steps required for a JSP file Processing:

  1. First the user will go to the web site which is developed using JSP. Then user will go to a JSP page ending with .jsp.

  2. The web browser makes the request via the Internet.

  3. The JSP request gets sent to the web server. The web server recognizes that the file required is special (.jsp) therefore it passes the JSP file to the JSP Servlet Engine.

  4. If the JSP file has been called for the first time then the JSP file is parsed by the JSP Servlet Engine.

  5. The JSP Servlet Engine generate a special Servlet from the JSP file, all the required HTML is converted to println statements.

  6. Then next the Servlet source code is compiled into a class file.

  7. Then Servlet is instantiated by servlet container and also calling the init and service methods.

  8. After calling the init and service methods servlet outputís a HTML which is send via Internet and the result is displayed on the userís web browser.

Pr.Pg border                                              Next Pg