title: How to enable Gzip compression on dynamic content using Jetty 9
body: <p>I'm running SolR using Jetty 9. It works fine.</p>
  
  <p>I have the following configuration: 1 web server (IIS), 1 solr Server (Jetty).</p>
  
  <p>To optimize bandwith usage, I want to enable GZIP compression between those 2 servers.</p>
  
  <p>I tried to add this into <code>jetty/etc/webdefault.xml</code> :</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;filter&gt;
      &lt;filter-name&gt;GzipFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.eclipse.jetty.servlets.GzipFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;mimeTypes&lt;/param-name&gt;
        &lt;param-value&gt;text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,application/json,image/svg+xml&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;GzipFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>I get the following error :</p>
  
  <pre><code>2013-06-19 11:16:19.534:WARN:oejuc.AbstractLifeCycle:main: FAILED GzipFilter: javax.servlet.UnavailableException: org.eclipse.jetty.servlets.GzipFilter
  javax.servlet.UnavailableException: org.eclipse.jetty.servlets.GzipFilter
      at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:108)
      at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:91)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:743)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:279)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1312)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:722)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:490)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:274)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:193)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.updateBeans(ContainerLifeCycle.java:713)
      at org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:89)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:165)
      at org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:155)
      at org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.java:41)
      at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:495)
      at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:175)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
      at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:600)
      at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:528)
      at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
      at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:145)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:557)
      at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:232)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:108)
      at org.eclipse.jetty.server.Server.start(Server.java:346)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:90)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
      at org.eclipse.jetty.server.Server.doStart(Server.java:294)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1233)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1160)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.jetty.start.Main.invokeMain(Main.java:453)
      at org.eclipse.jetty.start.Main.start(Main.java:595)
      at org.eclipse.jetty.start.Main.main(Main.java:96)
  2013-06-19 11:16:19.534:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@3dada196{/,file:/E:/Solr/jetty-9/webapps/ROOT/,STARTING}{E:\Solr\jetty-9\webapps\ROOT}
  javax.servlet.UnavailableException: org.eclipse.jetty.servlets.GzipFilter
      at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:108)
      at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:91)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:743)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:279)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1312)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:722)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:490)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:274)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:193)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.updateBeans(ContainerLifeCycle.java:713)
      at org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:89)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:165)
      at org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:155)
      at org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.java:41)
      at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:495)
      at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:175)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
      at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:600)
      at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:528)
      at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
      at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:145)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:557)
      at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:232)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:108)
      at org.eclipse.jetty.server.Server.start(Server.java:346)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:90)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
      at org.eclipse.jetty.server.Server.doStart(Server.java:294)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1233)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1160)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.jetty.start.Main.invokeMain(Main.java:453)
      at org.eclipse.jetty.start.Main.start(Main.java:595)
      at org.eclipse.jetty.start.Main.main(Main.java:96)
  </code></pre>
  
  <p>Anyone have an idea?</p>