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
“Configuring 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 configure the caching parameters in the
sun-web.xml
file 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
.
Configuring 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 significantly 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
.
Configuring 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
file has changed, the entire web application is reloaded.
Set the dynamic reload interval on the configuration'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
.
Tuning Java Web Application Performance
Chapter 2 • Tuning Sun Java System Web Server
79
Summary of Contents for Sun Java System Web Server 7.0
Page 9: ...Figures FIGURE 2 1 Web Server Connection Handling 40 9 ...
Page 10: ...10 ...
Page 18: ...18 ...
Page 38: ...38 ...
Page 84: ...84 ...
Page 100: ...100 ...