Wednesday, April 19, 2017

JSP Life Cycle

JSP Life Cycle



  1. Translating JSP to Servlet. (hello.jsp->hello_jsp.java)
  2. Compile the translated Servlet. (hello_jsp.java->hello_jsp.class)
  3. Loads the translated Servlet.
  4. Creates the instance of translated Servlet.
  5. Calls the life cycle method _jspInit().
  6. when user sends the request then container calls the life cycle method _jspService().
  7. At container shutdown time, containers call the _jspDestroy() method of life cycle.
You can find the translated Servlet and compiled classes in the folder Tomcat6.0catlinalocalhostorgapachejsp

Available link for download