The JSP Life Cycle

These are the life cycle phases of a JSP (hello.jsp, for instance):
  1. Translate hello.jsp into hello$
  2. Compile hello$jsp.class.
  3. Load the jsp-servlet class.
  4. Create an instance of the jsp-servlet.
  5. Call the jsp-servlet's jspInit() method.
  6. Call the jsp-servlet's _jspService() method for each request. Repeat indefinitely. Multiple threads may call concurrently!
  7. Call the jsp-servlet's jspDestroy() method.
  8. Unload the jsp-servlet class.
As with servlets, if Tomcat discovers
that the jsp file's timestamp has changed, it
  1. Calls the old jsp-servlet's jspDestroy() method,
  2. Unloads the old jsp-servle class, and
  3. Starts a new JSP life cycle (translation step 1. above).