Understanding the JSP Life Cycle Explained by Mr. G. M. Krishnapkshi

topic jsp life cycle n.w
1 / 8
Embed
Share

Explore the detailed explanation of the JSP life cycle presented by Mr. G. M. Krishnapkshi, Assistant Professor at Deogiri College, Aurangabad. Learn about the phases including translation, compilation, loading, instantiation, initialization, request processing, and cleanup. Gain insights into how JSP pages are converted to servlets and the sequence of steps involved in handling JSP requests.

  • JSP Life Cycle
  • Mr. G. M. Krishnapkshi
  • Servlet
  • Request Processing
  • JSP Pages

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Topic JSP Life Cycle Presented by Mr. G. M. Krishnapkshi Assistant Professor Department of Computer Science and IT. Deogiri College, Aurangabad

  2. JSP Life Cycle BY MR. G.M. KRISHNAPAKSHI

  3. JSP Life Cycle JSP Life cycle process started with its creation which later translated to a servlet and afterward servlet lifecycle comes into play. The JSP pages follow these phases: Translation of JSP Page Compilation of JSP Page Classloading (the classloader loads class file) Instantiation (Object of the Generated Servlet is created). Initialization ( the container invokes jspInit() method). Request processing ( the container invokes _jspService() method). Destroy ( the container invokes jspDestroy() method).

  4. Translation of JSP page to Servlet : This is the first step of JSP life cycle. This translation phase deals with Syntactic correctness of JSP. Here test.jsp file is transllated to test.java. Compilation of JSP page : 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. 1. 2. 3.

  5. Classloading : Servlet class which has been loaded from JSP source is now loaded into container. Instantiation : Here instance of the class is generated. The container manages one or more instance by providing response to request Initialization : jspInit() method is called only once during the life cycle immediately after the generation of Servlet instance from JSP.

  6. Request processing : _jspService() method is used to serve the raised requests by JSP.It takes request and response object as parameters.This method cannot be overridden. JSP Cleanup : In order to remove the JSP from use by the container or to destroy method for servlets jspDestroy()method is used. This method is called once, if you need to perform any cleanup task like closing open files, releasing database connections jspDestroy() can be overridden.

  7. Thank You!

Related


More Related Content