Related Documentation : Web Cache User Guide : Caching Web Pages and Page Fragments : Steps for Caching Web Pages
Steps for Caching Web Pages
Caching web pages does not require any code changes. Your application server should support servlet filtering already. Simply update your web.xml file, re-deploy. and you should see the speedup right away.
The basic steps you'll need to follow to configure Ehcache for web-page caching are as follows (these steps assume you already have Ehcache installed in your application):
1. Configure a servlet page filter in web.xml.
2. Configure an appropriate cache in ehcache.xml.
3. Start (or re-start) your application.
The following settings should help you setup web caching for your application.
Step 1 - Add a filter to your web.xml
The first thing you'll need to do is add a filter to enable page caching.
The following web.xml settings will enable a servlet filter for page caching:

<web-app xmlns=""
xsi:schemaLocation=" "


<!-- This is a filter chain. They are executed in the order below.
Do not change the order. -->
Step 2 - Configure an ehcache.xml
The second step to enabling web page caching is to configure Ehcache with an appropriate ehcache.xml.
The following ehcache.xml file should configure a reasonable default cache:
<ehcache xmlns:xsi=""
<cache name="SimplePageCachingFilter"
Step 3 - Start your application server
Now start your application server. Pages should be cached.
Copyright © 2010-2015 Software AG, Darmstadt, Germany.

Product Logo |   Feedback