try to put u filter on top of web.xml (instead of middle or bottom), i try this few day and it just only a simple solution (not sure is a spec to put on top or is a bug)
hope this help. kiwi On Sat, Nov 13, 2010 at 8:11 PM, Jay Luker <lb...@reallywow.com> wrote: > Hi, > > I thought I'd try turning on gzip compression but I can't seem to get > jetty's GzipFilter to actually compress my responses. I unpacked the > example solr.war and tried adding variations of the following to the > web.xml (and then rejar-ed), but as far as I can tell, jetty isn't > actually compressing anything. > > <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>*</param-value> > </init-param> > </filter> > > <filter-mapping> > <filter-name>GZipFilter</filter-name> > <url-pattern>*</url-pattern> > </filter-mapping> > > I've also tried explicitly listing mime-types and assigning the > filter-mapping using <servlet-name>. I can see that the GzipFilter is > being loaded when I add -DDEBUG to the jetty startup command. But as > far as I can tell from looking at the response headers nothing is > being gzipped. I'm expecting to see "Content-Encoding: gzip" in the > response headers. > > Anyone successfully gotten this to work? > > Thanks, > --jay >