This web application demonstrates a compression filter included in the Tomcat 4.0 server. It examines the request headers to determine if the client supports compression, and if so, wraps the response object with a custom response to compress the output. The article explaining this web application can be found at JavaWorld, written by Jason Hunter.
You can test the compression by visiting the compressionTest servlet.