JSP run time compilation settings


 

+

Search Tips   |   Advanced Search

 

By default, the JSP engine...

  1. translates a requested JSP file
  2. compiles the .java file
  3. loads the compiled servlet into the run time environment

We can change the JSP engine default behavior by indicating that a JSP file must not be translated or compiled at run time, even when a .class file does not exist.

If run time compilation is disabled, precompile the JSPs, which provides the following advantages:

We can disable run time JSP file compilation on a global or an individual Web app basis:

If we disable run time compilation and a request arrives for a JSP file that does not have a matching .class file, the JSP engine returns the following 404 error to the browser:

Error 404: SRVE0200E: Servlet [org.apache.jsp._jsp1]: Could not find required servlet class - _jsp1.class

In this case, an exception is written to the System Out (SYSOUT) and First Failure Data Capture (FFDC) logs. .

If a JSP file has a matching .class file but that file is out of date, the JSP engine still loads the .class file into memory.



Related concepts

JSPs

 

Related tasks

Develop Web apps

 

Related

Custom property settings
Web container custom properties