Life Cycle of JSPs

JSPs are essentially compiled to servlets and hence follow the life cycle of servlets.

As you can see in Figure 5.2, there are three stages in the life cycle of a JSP, which are similar to the servlet life-cycle stages:

  • Initialization— A compiled servlet is initialized by the WebLogic Server when it is loaded for the first time. The compiled servlet of a JSP is initialized by the WebLogic Server every time the JSP is modified.

  • Manage request and response— Any requests received by the Web server are forwarded to the compiled servlet to handle. The compiled servlet contains a service() method that is invoked by the WebLogic Server on every browser request. The service() method contains all the Java statements that are embedded ...

Get Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.