JSP life cycle

The JSP pages follows below  phases:


Translation of JSP Page
In this phase JSP file converted into Servlet(.java file)

Compilation of JSP Page
In this phase .java file converted into .class

Instantiation
Servlet container create the instance of servlet.

Initialization
Container invoke jspInit() method
This method is called only once in JSP life cycle.
Reqeust processing
_jspService() method is invoked by the container
This method is called for every request.

Destruction phase
Container invoke jspDestroy() method

Understanding JSP Project Structure

JSP Project Structure:

jsp-project-strcuty

 

Src folder contain all java file.

webcontent/webinf/lib folder contain all required jar file

web.xml -Deployment descriptor

web content folder contain all Web Resources file like JSP,Html,CSS etc.