Sun Java System Web Server 7.0 Update 7 Performance Tuning, Sizing, and Scaling Guide

Using Precompiled JSPs

Compiling JSPs is a resource-intensive and relatively time-consuming process. By default, the Web Server periodically checks to see if your JSPs have been modified and dynamically reloads them. This allows you to deploy modifications without restarting the server. The reload-interval property of the jsp-config element in sun-web.xml controls how often the server checks JSPs for modifications. However, there is a small performance penalty for that checking.

When the server detects a change in a .jsp file, only that JSP is recompiled and reloaded; the entire web application is not reloaded.

If your JSPs don't change, you can improve performance by pre-compiling your JSPs.

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 grouped 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 pre-compiled servlet is used. For more information on JSPs, see Sun Java System Web Server 7.0 Update 7 Developer’s Guide to Java Web Applications. Also see Configuring Class Reloading.