- User requesting a JSP page through internet via web browser.
- The JSP request is sent to the Web Server.
- Web server accepts the requested .jsp file and passes the JSP file to the JSP Servlet Engine.
- If the JSP file has been called the first time then the JSP file is parsed otherwise servlet is instantiated.
- The next step is to generate a servlet from the JSP file. In that servlet file, all the HTML code is converted in println statements.
- Now, The servlet source code file is compiled into a class file (bytecode file).
- The servlet is instantiated by calling the init and service methods of the servlet’s life cycle.
- Now, the generated servlet output is sent via the Internet form web server to user’s web browser.
- Now in last step, HTML results are displayed on the user’s web browser.