I understand that I am already answering this question late, but maybe this can help someone.
The JSP life cycle includes the following steps:
1) Compilation
2) Initialization
3) Execution
4) Cleaning
JSP Compilation
When a browser requests a JSP, the JSP engine first checks to see if it needs to compile the page. If the page has never been compiled or if the JSP has been modified since the last compilation, the JSP mechanism compiles the page.
The compilation process involves three steps -
1) JSP parsing.
2) Including JSP in the servlet.
3) Compilation of the servlet.
When the JSP is converted to a servlet, it must be executed by the server to service the request.
source share