Sun Microsystems 7 Security Camera User Manual


 
When adding a web application, either through the Admin Console or CLI, choose the
precompile JSPs option. Enabling precompiled JSPs allows all the JSPs present in the web
application to be pre-compiled, and their corresponding servlet classes are bundled in the web
application's WEB-INF/lib or WEB-INF/classes directory. When a JSP is accessed, it is not
compiled and instead, its precompiled servlet is used. For more information on JSPs, see Sun
Java System Web Server 7.0 Update 1 Developer’s Guide to Java Web Applications. Also see
“Conguring Class Reloading” on page 79.
Using Servlet/JSP Caching
If you spend a lot of time re-running the same servlet/JSP, you can cache its results and return
results out of the cache the next time it is run. For example, this is useful for common queries
that all visitors to your site run: you want the results of the query to be dynamic because it might
change daily, but you don't need to run the logic for every user.
To enable caching, you congure the caching parameters in the sun-web.xml le of your
application. For more details, see “Caching Servlet Results” in Sun Java System Web Server 7.0
Update 1 Developer’s Guide to Java Web Applications.
Conguring the Java Security Manager
Web Server supports the Java Security Manager. The main drawback of running with the
Security Manager is that it negatively impacts performance. The Java Security Manager is
disabled by default when you install the product. Running without the Security Manager might
improve performance signicantly for some types of applications. Based on your application
and deployment needs, you should evaluate whether to run with or without the Security
Manager. For more information, see Sun Java System Web Server 7.0 Update 1 Developer’s Guide
to Java Web Applications.
Conguring Class Reloading
The dynamic reload interval of the servlet container and the dynamic-reload-interval of the
class-loader element in sun-web.xml control the frequency at which the server checks for
changes in servlet classes. When dynamic reloading is enabled and the server detects that a
.class le has changed, the entire web application is reloaded.
Set the dynamic reload interval on the conguration's Java tab Servlet Container sub tab, or
using the wadm set-servelt-container-props command. In a production environment
where changes are made in a scheduled manner, set this value to 0 to prevent the server from
constantly checking for updates. The default value is 0 (that is, class reloading is disabled). For
more information about elements in sun-web.xml, see Sun Java System Web Server 7.0 Update 1
Developer’s Guide to Java Web Applications.
TuningJavaWebApplicationPerformance
Chapter2 • TuningSunJavaSystemWebServer 79