Configuring servlet caching
After a servlet is started and completes generating the output to cache, a cache entry is created containing the output and the side effects of the servlet. These side effects can include calls to other servlets or JavaServer Pages (JSP) files or metadata about the entry, including timeout and entry priority information. Configure servlet caching to save the output of servlets and JavaServer Pages (JSP) files to the dynamic cache.
Before you begin
About this task
Unique entries are distinguished by an ID string that
is generated from the HttpServletRequest object each time the servlet
runs. You can then base servlet caching on:
- Request parameters and attributes of the Universal Resource Identifier (URI) that was used to invoke the servlet
- Session information
- Other options, including cookies
Procedure
- In the administrative console, click Servers > Server Types > WebSphere application servers > server_name > Web container settings > Web container in the console navigation tree.
- Select Enable servlet and command caching under the Configuration tab.
- Click Apply or OK.
-
Restart WebSphere® Application Server.
Refer to the Managing application servers topic for more information.