J2EE GZIP Servlet Filter
set up filter and filter-mapping in your web.xml
Filter both request and response
<filter>
<filter-name>gzip</filter-name>
<filter-class>tk.blizz.gzipfilter.GZIPFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>gzip</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Filter all request
...
<filter>
<filter-name>gzipRequest</filter-name>
<filter-class>tk.blizz.gzipfilter.GZIPRequestFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>gzipRequest</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
...
Filter response with jsps
...
<filter>
<filter-name>gzipResponse</filter-name>
<filter-class>tk.blizz.gzipfilter.GZIPResponseFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>gzipResponse</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
...