Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • JSP Life Cycle

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 785
    Comment on it

    JSP is a server side scripting language. JSP is used to develop web applications. We can do everything on JSP which we can do with Servlet. In JSP we can add the Java code inside the HTML tags.

     

    There are three service methods provided by JSP:

    1. public void jspInit()
    2. public void _jspService(HttpServletRequest request, HttpServletResponse response)
    3. public void jspDestroy()


    Following is the Life-cycle of JSP :

    1. Parsing JSP : JSP page is first compiled for the syntax or other errors.
    2. Translation from JSP to Servlet : After successfully parsing, the JSP is translated to the Servlet or Java file.
    3. Compiling the Servlet : In this phase converted Servlet is compiled to class file.
    4. Class Loading : Loading the Servlet class into memory.
    5. Installation : Creating Servlet instance in memory.
    6. Initialization : In this phase JSP instance is initialized by calling the jspinit() method. The initialization is takes place only once when request comes first time.
    7. Service : In this phase the jsp engine provides the service for the JSP request. On each time request will come jsp engine invoke the _jspService() method, and this will be responsible to process the request and provide the response to the client.
    8. Destroy : In this phase jsp engine invoke the jspDestroy() method to do resource clean up.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: