JSP Life Cycle: A JSP life cycle can be defined as the entire process from its creation till the destruction which is similar to a servlet life cycle with an additional step which is required to compile a JSP into servlet. Following are the steps followed by a JSP Container: ◦ Compilation ◦ Parsing the JSP. ◦ Turning the JSP into a servlet. ◦ Compiling the servlet. ◦ Initialization ◦ Execution ◦ Cleanup Architecture: 1. JSP Compilation: When a browser asks for a JSP, the JSP engine first checks to see whether it needs to compile the page. If the page has never been compiled, or if the JSP has been modified since it was last compiled, the JSP engine compiles the page. The compilation process involves three steps: ◦ Parsing the JSP. ◦ Turning the JSP into a servlet. ◦ Compiling the servlet. 2. JSP Initialization: When a container loads a JSP it invokes the jspInit() method before servicing any requests. If you need to perform
Comments
Post a Comment