tags:

views:

440

answers:

1

I'm trying to setup Jetty to serve compressed html content. In web.xml I setup GzipFilter and mapped it to /* but this doesn't seem to work. Here's the filter configuration:

<filter>
 <filter-name>GZipFilter</filter-name>
 <display-name>Jetty's GZip Filter</display-name>
 <description>Filter that zips all the content on-the-fly</description>
 <filter-class>org.mortbay.servlet.GzipFilter</filter-class>
 <init-param>
  <param-name>mimeTypes</param-name>
  <param-value>text/html</param-value>
 </init-param>
</filter>

<filter-mapping>
 <filter-name>GZipFilter</filter-name>
 <url-pattern>/*</url-pattern>
</filter-mapping>

I'm just starting to use Jetty, so the solution might be ridiculously simple. If you can link me to documentation that might help me, that would be great too.

A: 

What was the error? Are you getting classpath problems or something else? If classpath, you need to make sure the gzipfilter class is available to the jetty runtime or it will die.

Chilly
I finally got time to get back to this issue. I'm not getting any errors. But I don't see any gzipping actually happening. How can I check that the filter is actually functioning?
Misha