JavaServer Pages are made operable by having their contents (HTML tags, JSP tags and scripts) translated into a servlet by the application server.
- A request is sent to the JSP page from web browser.
- The content of the JSP file is parsed by the JSP engine.
- The JSP engine translates the JSP to a servlet java file based on the content of the JSP. The generated servlet is responsible for rendering the static elements of the JSP specified at design time in addition to creating the dynamic elements of the page.
- The servlet java file is compiled by the Java compiler into a servlet class file.
- The servlet is instantiated. The init and service methods of the servlet are called, and the servlet logic is executed.
- The static HTML, graphics and dynamic elements specified in the original JSP page definition are sent to the Web browser through the output stream of the servlet’s response object.
We assume that you already have some knowledge in java fundamentals Java Fundamentals
Setup working environment Create new Dynamic Web Project with Eclipse IDE