From the course: Java EE: Servlets and JavaServer Pages (JSP)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understanding the JSP life cycle

Understanding the JSP life cycle

From the course: Java EE: Servlets and JavaServer Pages (JSP)

Start my 1-month free trial

Understanding the JSP life cycle

- [Instructor] Now let us understand what the JSP life cycle is. This is going to be very simple to understand because by this time we already know what the servlet life cycle is. So this also can be viewed in two phases. The first phase is when the first request comes in for the JSP and the second phase is when repeated requests come in for the same JSP. Let's look at the first phase. When the first request comes in for a JSP, then the container is first going to translate that JSP to a servlet file. We've already spoken about this translation process when we started discussing the JSP elements. So that's the first step that the container takes. Please rest assure that the container's going to completely own up the responsibility of translating that JSP to a servlet. We don't need to do anything for this. Once that's done, then the translated servlet file, which is a .java file is going to get compiled into a .class file. Once this is done, now let's understand that translation and…

Contents