Oracle JavaServer Pages Developer's Guide and Reference
Release 8.1.7

Part Number A83726-01





Go to previous page Go to beginning of chapter Go to next page

OracleJSP Runtime Considerations (Non-OSE Only)

This section describes conditions under which OracleJSP retranslates pages, reloads pages, and reloads classes during runtime. This discussion does not apply to JSP pages running in the Oracle Servlet Engine.

Dynamic Page Retranslation

As a Web application is running, the OracleJSP container by default will automatically retranslate and reload a JSP page whenever the page source is modified.

OracleJSP checks whether the last-modified time of the page implementation class file, as indicated in the OracleJSP in-memory cache, is older than the last-modified time of the JSP page source file.

You can avoid the overhead of OracleJSP checking timestamps for retranslation by setting the OracleJSP developer_mode flag to false. This is advantageous in a deployment environment, where source and class files will typically not change. For more information about this flag, see "OracleJSP Configuration Parameters (Non-OSE)". For how to set it, see "OracleJSP Configuration Parameter Settings".


  • Because of the usage of in-memory values for the class file last-modified time, note that removing a page implementation class file from the file system will not cause OracleJSP to retranslate the associated JSP page source. OracleJSP will only retranslate when the JSP page source file timestamp changes.

  • The class file will be regenerated when the cache is lost. This happens whenever a request is directed to this page after the server is restarted or after another page in this application has been retranslated.


Dynamic Page Reloading

The OracleJSP container will automatically reload a JSP page (in other words, reload the generated page implementation class) under the following circumstances.

Dynamic Class Reloading

By default, before OracleJSP dispatches a request that will execute a Java class that was loaded by the OracleJSP class loader, it checks to see if the class file has been modified since it was first loaded. If the class has been modified, then the OracleJSP class loader reloads it.

This applies only to classes in the OracleJSP classpath, which includes the following:

As mentioned in the preceding section, "Dynamic Page Reloading", reloading a class results in the dynamic reloading of JSP pages that reference that class.


  • Remember that classes must be in the JSP classpath, not the system classpath, to be dynamically reloaded. If they are in the system classpath as well, the system class loader may take precedence in some circumstances, possibly interfering with JSP automatic-reloading functionality.

  • Dynamic class reloading can be expensive in terms of CPU usage. You can disable this feature by setting the OracleJSP developer_mode parameter to false. This is appropriate in deployment environments where classes are not expected to change.


For information about the classpath and developer_mode configuration parameters and how to set them, see "OracleJSP Configuration Parameters (Non-OSE)" and "OracleJSP Configuration Parameter Settings".

Go to previous page
Go to beginning of chapter
Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.