What happens in the translation phase?

-Looks at the directives for information it might need during translation
-Creates an HttpServlet subclass
For tomcat 5, it extends org.apache.jasper.HttpJspBase
-If there is page directive with an import attribute, it writes the import statement above the class file just below the package statement.
-If there are declarations then it writes it below the class declaration and above the _jspService() method. Tomcat 5 declares one static variable and one instance variable of its own.
-Builds the service method. It’s actual name is _jspService(). It is called by the servlet superclass’s overridden service() method. As a part of building this method the container declares and initializes all the implicit objects.
-Combines the html(called templet text), scriptlets, and expressions into the service method.

No comments:

Post a Comment