CodesJava

Easy learning with example program codes

What are the JSP lifecycle phases?


A JSP page is converted into servlet before service requests. JSP Lifecycle consists of following phases:

JSP Page Translation:

The container validates the JSP page and parse it to generate the servlet file.

JSP Page Compilation:

The generated servlet file is compiled into a servlet class.

Class Loading:

Container loads the generated servlet class into memory.

Instantiation:

Container invokes the no argument constructor of generated servlet class to load it into memory and instantiate it.

Initialization:

After creating the instance, jspInit() method is called to initialize it.

Request Processing:

The _jspService() is called by web container every time when a request is come for the jsp.
Syntax: public void _jspService() throws ServletException,IOException
Note: In this method underscore (_) represents that implementation of this method is provided by auto generated servlet and it can’t be overridden by developer.

Destroy:

The jspDestroy() method is called by web container to unload JSP from memory.

Posted in JSP   
Sign Up/ Sign In
Ask a Question


Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at hr@codesjava.com.

Development

We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on hr@codesjava.com.

Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki