Sun Java System Web Server 6.1 SP12 Performance Tuning, Sizing, and Scaling Guide

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 day to day, but you do not 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 information about caching servlet results in the Sun Java System Web Server 6.1 SP12 Programmer’s Guide to Web Applications.