3.2.1: 2012-12-13

net.sf.basedb.clients.web.servlet
Class CacheControlFilter

java.lang.Object
  extended by net.sf.basedb.clients.web.servlet.CacheControlFilter
All Implemented Interfaces:
Filter

public final class CacheControlFilter
extends Object
implements Filter

This is a filter that sets the "Cache-Control" header in the http response. It can be useful in a development environment to, for example, disable caching of *.js and *.css files. See example in the web.xml file.

Since:
3.1
Author:
Nicklas
Last modified
$Date: 2011-12-07 14:43:15 +0100 (Wed, 07 Dec 2011) $

Field Summary
private  String cacheControl
           
 
Constructor Summary
CacheControlFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 void init(FilterConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheControl

private String cacheControl
Constructor Detail

CacheControlFilter

public CacheControlFilter()
Method Detail

init

public void init(FilterConfig config)
Specified by:
init in interface Filter

destroy

public void destroy()
Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
IOException
ServletException

3.2.1: 2012-12-13