[Version 5.0.1 and later]Disabling JavaServer Pages run-time compilation

By default, the JavaServer Pages (JSP) engine translates a requested JSP file, compiles the .java file, and loads the compiled servlet into the run-time environment. In previous releases of WebSphere Application Server, if a .class file did not exist, the JSP engine always translated and compiled the JSP file. You had to turn off the Web applications reload capability to prevent additional translations and recompiles of the file.

With Version 5.0.1 of WebSphere Application Server, you can now change the JSP engine default behavior by indicating a JSP file should never be translated or compiled at run time, even when a .class file does not exist.

If run-time compilation is disabled, you must precompile the JSP files, which provides the following advantages:

You can disable run-time JSP file compilation on a global or an individual Web application basis:

If you disable run-time compilation and a request arrives for a JSP file that does not have a matching .class file, the JSP engine returns HTTP error 501 (Not implemented) to the browser. If the JSP file does not exist, the JSP engine returns HTTP error 404 (File not found) to the browser. In both cases, 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.

Perform the following steps to determine whether the disableJspRuntimeCompilation option is enabled in WebSphere Application Server:

  1. Enable the Diagnostic Trace Service and set the trace specification to com.ibm.ws.webcontainer.jsp.servlet.*=all=enabled.
  2. Request a JSP file.
  3. Locate the string, disableJspRuntimeCompilation:true, in the trace.log file.
  4. Ensure the jspUri: entry matches the requested JSP file.

If both the disableJspRuntimeCompilation:true string and the matching jspUri: entry appear in the trace, the disableJspRuntimeCompilation setting is enabled for the Web application.


Related concepts
JavaServer Pages files
Related tasks
Developing Web applications
Related reference
JavaServer Pages attribute assembly settings[Version 5.0.1][Version 5.0.2]
Custom property settings



Searchable topic ID:   rweb_jspdis
Last updated: Jun 21, 2007 4:55:42 PM CDT    WebSphere Application Server Network Deployment, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rweb_jspdis.html

Library | Support | Terms of Use | Feedback