Results 1 to 3 of 3

Lifecycle Phases of JSP


This discussion is about "Lifecycle Phases of JSP" in the "General Discussions" forums.
Hello Everyone, I want to know about the lifecycle phases of JSP. I am preparing for the JSP interview which is in the upcoming week. ...

  1. #1
    Newbie
    Join Date
    Jun 2019
    Gender
    Male
    Posts
    3

    Default Lifecycle Phases of JSP


    Hello Everyone, I want to know about the lifecycle phases of JSP. I am preparing for the JSP interview which is in the upcoming week. Can anyone explain me the process of Translation, ClassLoading, and Initialization with some examples?

  2. #2
    C.I.A. teoding's Avatar
    Join Date
    May 2007
    Gender
    Male
    Posts
    5,979
    kaon og ginamos og dukot b4 sa imong interview ts.

  3. #3
    Newbie
    Join Date
    Jun 2019
    Gender
    Male
    Posts
    2
    Hi Arjun,

    Here you can go to know more about the lifecycle phases of JSP.

    1. Translation of JSP page to Servlet
    2. Compilation of JSP page(Compilation of JSP into test.java)
    3. Classloading (test.java to test.class)
    4. Instantiation(Object of the generated Servlet is created)
    5. Initialization(jspInit() method is invoked by the container)
    6. Request processing(_jspService()is invoked by the container)
    7. JSP Cleanup (jspDestroy

    () method is invoked by the container)

    Here you can know each step in details also:

    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 :

    Here the generated java servlet file (test.java) is compiled to a class file (test.class).

    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 requests.

    Initialization :

    jspInit() method is called only once during the life cycle immediately after the generation of Servlet instance from JSP.

    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.

    To check here more JSP interview Questions for upcoming JSP interviews.

  4.    Advertisement

Similar Threads

 
  1. Replies: 87
    Last Post: 07-20-2011, 03:14 PM
  2. Replies: 1
    Last Post: 06-18-2011, 01:41 AM
  3. What Do You think of Peltier cooling & Phase cooling?
    By jojobanana92400 in forum Computer Hardware
    Replies: 16
    Last Post: 07-11-2009, 04:40 PM
  4. Replies: 0
    Last Post: 07-02-2009, 11:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top