Class LastModifiedCacheControlFilter
- java.lang.Object
-
- com.aoindustries.servlet.lastmodified.LastModifiedCacheControlFilter
-
- All Implemented Interfaces:
Filter
public class LastModifiedCacheControlFilter extends Object implements Filter
Adds acache-control
header to any request with aLastModifiedServlet.LAST_MODIFIED_PARAMETER_NAME
parameter. The header is added before the filter chain is called.This should be used for the
DispatcherType.REQUEST
dispatcher only.Init Parameters: cache-control: The content of the
cache-control
header, defaults toSee also:
- See Also:
for supported patterns
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_CACHE_CONTROL
The default, very aggressive,cache-control
header value.
-
Constructor Summary
Constructors Constructor Description LastModifiedCacheControlFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
void
init(FilterConfig config)
-
-
-
Field Detail
-
DEFAULT_CACHE_CONTROL
public static final String DEFAULT_CACHE_CONTROL
The default, very aggressive,cache-control
header value.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(FilterConfig config)
-
doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
- Specified by:
doFilter
in interfaceFilter
- Throws:
IOException
ServletException
-
-