Free Jobs
Reference




Java Forums: Core Java (15) J2EE (3) EJB (5) Servlet (3) JDBC (6) Hibernate (2) Struts (1) Swing (1) Oracle (7) JSP (4) Other (10)

Topic: Can you explain the Life Cycle of a JSP Page

To get the Posted Questions details daily in your mail Click Here

Share this Post on Facebook/Twitter/Orkut Bookmark and Share





User: jennifer100 Post Date: 17 Nov 2011 00:00

Introduction:
Can you explain the Life Cycle of a JSP Page



Main Content:

Below are the eight phages of JSP page life cycle


  1.JSP Pre Translated Phase :This is a phase before A java servlet file is generated from the JSP source file.This is the first phase of JSP  Life cycle.


  2.JSP Translated Phase : This is a phase when a java servlet file is generated from the JSP source file.


  3.JSP compilation Phase :  This is a phase when a java servlet file is compiled to a JAVA Servlet Class.


  4.JSP  Class Loading : This is a phase when java servlet class is loaded into the container.


  5.JSP Execution phase : This is a phase when the container manages one or more instances of servlet class in response to different requests.


  6.JSP Initialization phase : This is a phase when initialization happens. It is called only once during JSP life cycle.jspInit() method is called just after the instance of servlet class is created.


  7.JSP Service phase : This is a phase when the request is actually served._jspService() method is called in this phase.


  8.JSP Service phase :  This is a phase when the JSP gets destroyed.jspDestroy() method is called in this phase.This phase is the end of JSP Life cycle.


Conclusion:
Thus there are mainly the eight phages of JSP page life cycle



About Writer:
Hi,I am working as JAVA Team Lead in an MNC in Bangalore.


Writer's Link:

Writer's Email:







Comments:
  • User: anssamiullah Post Date:   25 Nov 2011 00:51
    sir,can you explain what happens during the pre translation phase that is during first phase of jsp life cycle?whether life cycle methods of servlet is called within jsp life cycle and if life cycle methods of servlet is called in jsp life cycle when it is called?


Post Comment





Similar Articles Top ArticlesLatest Articles Other Articles by this Author







www.freejobsreference.com Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)