Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How does a jsp page get to the jsp engine?


Asked by Joyce Foley on Dec 06, 2021 JSP



As with a normal page, your browser sends an HTTP request to the web server. The web server recognizes that the HTTP request is for a JSP page and forwards it to a JSP engine. This is done by using the URL or JSP page which ends with .jsp instead of .html.
In this manner,
The JSP engine loads the JSP page from disk and converts it into a servlet content. This conversion is very simple in which all template text is converted to println ( ) statements and all JSP elements are converted to Java code. This code implements the corresponding dynamic behavior of the page.
In addition, As with a normal page, your browser sends an HTTP request to the web server. The web server recognizes that the HTTP request is for a JSP page and forwards it to a JSP engine. This is done by using the URL or JSP page which ends with.jsp instead of.html. The JSP engine loads the JSP page from disk and converts it into a servlet content.
In respect to this,
JavaServer Pages are built on top of the Java Servlets API, so like Servlets, JSP also has access to all the powerful Enterprise Java APIs, including JDBC, JNDI, EJB, JAXP, etc. JSP pages can be used in combination with servlets that handle the business logic, the model supported by Java servlet template engines.
Just so,
Typically, the JSP engine checks to see whether a servlet for a JSP file already exists and whether the modification date on the JSP is older than the servlet. If the JSP is older than its generated servlet, the JSP container assumes that the JSP hasn't changed and that the generated servlet still matches the JSP's contents.