Whenadding a web application, either through the Admin Console or CLI, choose the
precompileJSPs option. Enabling precompiled JSPs allows all the JSPs present in the web
applicationto be pre-compiled, and their corresponding servlet classes are bundled in the web
application'sWEB-INF/lib or WEB-INF/classes directory. When a JSP is accessed, it is not
compiledand instead, its precompiled servlet is used. For more information on JSPs, see Sun
JavaSystem Web Server 7.0 Update 1 Developer’s Guideto Java Web Applications. Also see
“ConguringClass Reloading” on page 79.
UsingSer vlet/JSP Caching
Ifyou spend a lot of time re-running the same servlet/JSP,you can cache its results and return
resultsout of the cache the next time it is run. For example, this is useful for common queries
thatall visitors to your site run: you want the results of the query to be dynamic because it might
changedaily, but you don't need to run the logic for every user.
Toenable 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
Update1 Developer’s Guide to JavaWeb Applications.
Conguringthe Java Security Manager
WebServer supports the Java Security Manager. The main drawback of running with the
SecurityManager is that it negatively impacts performance. The Java Security Manager is
disabledby default when you install the product. Running without the Security Manager might
improveperformance signicantly for some types of applications. Based on your application
anddeployment 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’sGuide
toJava Web Applications.
ConguringClass Reloading
Thedynamic reload interval of the servlet container and the dynamic-reload-interval of the
class-loaderelement in sun-web.xml control the frequency at which the server checks for
changesin servlet classes. When dynamic reloading is enabled and the server detects that a
.classle has changed, the entire web application is reloaded.
Setthe dynamic reload interval on the conguration's Java tab Servlet Container sub tab, or
usingthe wadm set-servelt-container-props command. In a production environment
wherechanges are made in a scheduled manner, set this value to 0 to prevent the server from
constantlychecking for updates. The default value is 0 (that is, class reloading is disabled). For
moreinformation about elements in sun-web.xml, see Sun Java System Web Server 7.0 Update 1
Developer’sGuide to JavaWeb Applications.
TuningJavaWeb Application Performance
Chapter2 • Tuning Sun Java System Web Server 79