The filter code is here in the class
com.jspbook.GZipFilter
.
The PJL Compression Filter is allegedly better.
Usage:
<web-app> <!-- GZip filter --> <filter> <filter-name>gzip</filter-name> <filter-class>com.jspbook.GZIPFilter</filter-class> </filter> <filter-mapping> <filter-name>gzip</filter-name> <url-pattern>*.js</url-pattern> </filter-mapping> <filter-mapping> <filter-name>gzip</filter-name> <url-pattern>*.css</url-pattern> </filter-mapping> <filter-mapping> <filter-name>gzip</filter-name> <url-pattern>*.html</url-pattern> </filter-mapping> <filter-mapping> <filter-name>gzip</filter-name> <url-pattern>*.texy</url-pattern> </filter-mapping> </web-app>