bb.servlet
Class CacheDisablingFilter
java.lang.Object
bb.servlet.AbstractFilter
bb.servlet.CacheDisablingFilter
- All Implemented Interfaces:
- Filter
public class CacheDisablingFilter
- extends AbstractFilter
This filter implements a universal cache-disabling service for an entire web application
via its doFilter
method.
This class is multithread safe: it is stateless.
- Author:
- Brent Boyer
Method Summary |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
This method sets the response header for all incoming HTTP requests with values
that should disable all caching for HTTP 1.1, HTTP 1.0, and any proxy server. |
CacheDisablingFilter
public CacheDisablingFilter()
doFilter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,
ServletException
- This method sets the response header for all incoming HTTP requests with values
that should disable all caching for HTTP 1.1, HTTP 1.0, and any proxy server.
Non-HTTP requests pass thru unmodified.
- Specified by:
doFilter
in interface Filter
- Specified by:
doFilter
in class AbstractFilter
- Parameters:
request
- The servlet request we are processingresponse
- The servlet response we are creatingchain
- The filter chain we are processing
- Throws:
IOException
- if an input/output error occurs
ServletException
- if a servlet error occurs