public abstract class CacheHttpServlet
extends javax.servlet.http.HttpServlet
In order to be safe, if this class detects that the servlet's query string, extra path info, or servlet path has changed, the cache is invalidated and recreated. However, this class does not invalidate the cache based on differing request headers or cookies; for servlets that vary their output based on these values (i.e. a session tracking servlet) this class should probably not be used.
No caching is performed for POST requests.
CacheHttpServletResponse and CacheServletOutputStream are helper classes to this class and should not be used directly.
This class has been built against Servlet API 2.2. Using it with previous Servlet API versions should work; using it with future API versions likely won't work.
Constructor and Description |
---|
CacheHttpServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException