Sunday, 28 December 2014
Saturday, 27 December 2014
Friday, 5 December 2014
JSP life cycle
JSP Life cycle exist in following phases
1. Translation phase
2. Compilation
3. Initialization
4. Instantiation
5. Request processing
6. Destruction
Every Jsp page internally converted to an equalent servlet class. It means writing a jsp page is nothing but indirectly writing a servlet class.
Each jsp page at server side executed in two phases.
1. Translation phase
2. Service phase/ Request processing phase.
1. Translation Phase
Whenever Web Container is received request, In translation phase web container creates an equalent servlet class for jsp page and then generates a .class file for that servlet. In this time container creates an Object of the generator .class file and initializes it before executing service phase by calling the jspInit() method.
In Translation phase a container uses two compilers
a) Page compiler -- converts a jsp page to servlet.
b) Java Compiler -- converts servlet .java file to .class file.
The Translation phase is executed for a first request arrived for a jsp page and also for a request given after modification of a jsp page.
2. Service phase or Request processing phase
After completing Translation phase container call the _jspService() method. In service phase, a request of a client is processed and response for the request will be sent to the client.
Service phase is executed for each request arrived for a jsp page.
after completing the request processing container calls the jspDestroy().
1. Translation phase
2. Compilation
3. Initialization
4. Instantiation
5. Request processing
6. Destruction
Every Jsp page internally converted to an equalent servlet class. It means writing a jsp page is nothing but indirectly writing a servlet class.
Each jsp page at server side executed in two phases.
1. Translation phase
2. Service phase/ Request processing phase.
1. Translation Phase
Whenever Web Container is received request, In translation phase web container creates an equalent servlet class for jsp page and then generates a .class file for that servlet. In this time container creates an Object of the generator .class file and initializes it before executing service phase by calling the jspInit() method.
In Translation phase a container uses two compilers
a) Page compiler -- converts a jsp page to servlet.
b) Java Compiler -- converts servlet .java file to .class file.
The Translation phase is executed for a first request arrived for a jsp page and also for a request given after modification of a jsp page.
2. Service phase or Request processing phase
After completing Translation phase container call the _jspService() method. In service phase, a request of a client is processed and response for the request will be sent to the client.
Service phase is executed for each request arrived for a jsp page.
after completing the request processing container calls the jspDestroy().
Subscribe to:
Comments (Atom)