Saturday, December 20, 2014

JSP Life cycle

Any Java server Page or JSP have below given life cycle phase

  • Pre-translated: Before the JSP file has been translated and compiled into the Servlet. In this step, any JSP file first converted into java file(it parse all jsp content and generate Servlet file)
  • Translated: The JSP file has been translated and compiled as a Servlet. In this phase Servet created in previous step has compiles and converted into class file)
  • Initialized: Prior to handling the requests in the service method the container calls the jspInit() to initialize the Servlet. It is called only once per Servlet instance.
  • Service: Services the client requests. Container calls this method for each request.
  • Destroy: The Servlet instance is out of service. The container calls the jspDestroy() method.

No comments:

Post a Comment