org.tuckey.web.filters.urlrewrite.gzip
Class GzipFilter

java.lang.Object
  extended by org.tuckey.web.filters.urlrewrite.gzip.GzipFilter
All Implemented Interfaces:
javax.servlet.Filter

public class GzipFilter
extends Object
implements javax.servlet.Filter

Provides GZIP compression of responses.

See the filter-mappings.xml entry for the gzip filter for the URL patterns which will be gzipped. At present this includes .jsp, .js and .css.

Version:
$Id: GzipFilter.java 744 2008-08-16 20:10:49Z gregluck $
Author:
Greg Luck, Adam Murdoch

Constructor Summary
GzipFilter()
           
 
Method Summary
 void destroy()
          A template method that performs any Filter specific destruction tasks.
 void doFilter(javax.servlet.ServletRequest sRequest, javax.servlet.ServletResponse sResponse, javax.servlet.FilterChain chain)
          Performs the filtering for a request.
 void init(javax.servlet.FilterConfig filterConfig)
          Performs initialisation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GzipFilter

public GzipFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Performs initialisation.

Specified by:
init in interface javax.servlet.Filter
Parameters:
filterConfig -
Throws:
javax.servlet.ServletException

destroy

public void destroy()
A template method that performs any Filter specific destruction tasks. Called from destroy()

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public final void doFilter(javax.servlet.ServletRequest sRequest,
                           javax.servlet.ServletResponse sResponse,
                           javax.servlet.FilterChain chain)
                    throws IOException,
                           javax.servlet.ServletException
Performs the filtering for a request.

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException


Copyright © 2001-2012 Paul Tuckey. All Rights Reserved.