1 of 6

ADVANCED JAVA PROGRAMMING

Life Cycle of JSP

Smt M.Jeevana Sujitha

Assistant Professor

Department of Computer Science and Engineering

SRKR Engineering College, Bhimavaram, A.P. - 534204

2 of 6

OBJECTIVES

The Objective of this lecture is

  • To learn about Life cycle of JSP.

3 of 6

Life Cycle of JSP

  • There are 5 phases in JSP life cycle.
  • Page Translation
  • Compilation
  • Loading and initialization
  • Request Handling
  • Destroy

4 of 6

Life Cycle of JSP

Page Translation:

  • In this phase the JSP container in the

webserver translates the JSP page into servlet page.

Compilation:

  • After translating the JSP page into servlet,

the JSP container compiles the servlet page to get the .class file.

Loading and Initialization:

  • After getting the .class file, the container loads the .class file and creates a servlet object and initializes it by using init() method.

5 of 6

Life Cycle of JSP

Request Handling:

  • The servlet object handles the request by using service() method.

Destroy:

  • After providing the service or response to the client then servlet object is to be destroyed by using destroy() method.

6 of 6

THANK YOU