Class ContentTypeBasedCachePreventionFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class ContentTypeBasedCachePreventionFilter
    extends AbstractCachePreventionFilter
    This filter implements browser/proxy cache prevention based on content types. That is done by whitelisting or blacklisting a defined set of content type patterns. It would prevent sensitive information being cached on web browsers and intermediate network devices that adhere to protocols HTTP 1.0 through HTTP 1.1. In order to accommodate future modifications to protocol specifications and introduction of custom cache prevention headers and values, the filter can also utilize headers and values that are defined in the web.xml file.
    • Constructor Detail

      • ContentTypeBasedCachePreventionFilter

        public ContentTypeBasedCachePreventionFilter()
    • Method Detail

      • doFilter

        public void doFilter​(javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response,
                             javax.servlet.FilterChain chain)
                      throws IOException,
                             javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Specified by:
        doFilter in class AbstractCachePreventionFilter
        Throws:
        IOException
        javax.servlet.ServletException