JSP Processing : Architecture



JSP Introduction :

  1. JSP stands for Java Server Pages. All your JSP pages are stored on the server.
  2. The web server have JSP engine which acts as a container to process JSP pages.
  3. All the requests for JSP Pages are intercepted by JSP Container.
  4. JSP container along with web server provide the runtime environment to JSP.

jsp servlet engine

JSP Processing :

Please find the below steps that are required to process JSP Page -

  1. Web browser sends an HTTP request to the web server requesting JSP page.
  2. Web server recognizes that the HTTP request by web browser is for JSP page by checking the extension of the file (i.e .jsp)
  3. Web server forwards HTTP Request to JSP engine.
  4. JSP engine loads the JSP page from disk and converts it into a servlet
  5. JSP engine then compiles the servlet into an executable class and forward original request to a servlet engine.
  6. Servlet engine loads and executes the Servlet class.
  7. Servlet produces an output in HTML format
  8. Output produced by servlet engine is then passes to the web server inside an HTTP response.
  9. Web server sends the HTTP response to Web browser in the form of static HTML content.
  10. Web browser loads the static page into the browser and thus user can view the dynamically generated page.