6.4 OVERVIEW

A JSP file is written as HTML. It gets converted to a Servlet. The process (of conversion) is done entirely internally, so it does not matter to an end-user, but definitely is of interest to the developer.

A JSP page runs on a JSP container, just like a Servlet runs on a Servlet container. The Servlet container normally doubles up as a JSP container as well. For instance Tomcat is a Servlet/JSP container.

When a JSP page is requested by the user, the container handles the action as follows.

  • First time (by any user for the JSP page)
    • Translate: Automatically translate the JSP code (i.e. the file/page) into a Java class. As in a Servlet, this class implements the javax.servlet.Servlet interface. Finer details like the name of the ...

Get Web Technology: Theory and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.