The servlet generated from the JSP file implements
javax.servlet.jsp.HttpJspPage interface, which is responsible for its lifecycle. This interface is very similar to the servlet lifecycle, but with JSP-specific features. The lifecycle methods of the
HttpJspPage interface correspond with the
Servlet interface methods:
HttpJspPage.jspInit(..) for jsp servlet initialization,
HttpJspPage.jspService(..) for request servicing, and
HttpJspPage.jspDestroy(..) for jsp servlet destruction.
Share this highlighthttp://www.safaribooksonline.com/a/apache-tomcat-7/16654/