O'Reilly logo

Web Technology: Theory and Practice by M. Srinivasan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.5 JSP LIFECYCLE

It is reiterated that a JSP is converted into a Servlet, so in many aspects they share similar life cycles (Figure 6.1).

 

JSP lifecycle

 

Fig. 6.1 JSP lifecycle

 

However, they share different names. The initialization corresponds to jspInit(); Service corresponds to jspService(); and the destruction to jspDestroy(). The JSP is translated into a Servlet and compiled the first time it is changed/created. Subsequently, it is ready for requests.

6.5.1 JSP Service Methods

As mentioned earlier, a JSP script is translated into Servlet code and then compiled into a Java Servlet class. The methods that a custom Servlet overrides are its Service ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required