title: Using WebAppProvider in Jetty 8, Jetty deploys a WAR and then can't find it
body: <p>I'm trying to use Jetty's <code>WebAppProvider</code> to watch a directory for WARs and deploy them.  Everything seems to work fine: Jetty reports that it's deploying the WAR to the context I'd expect.  But then when I try to visit the page, Jetty can't find anything there.</p>
  
  <p>My server code is</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      Server httpServer = new Server(3030);
      DeploymentManager deploymentManager = new DeploymentManager();
      httpServer.setDumpBeforeStop(true);
  
      ContextHandlerCollection contextHandlerCollection = new ContextHandlerCollection();
      contextHandlerCollection.setServer(httpServer);
      deploymentManager.setContexts(contextHandlerCollection);
  
      WebAppProvider appProvider = new WebAppProvider();
      appProvider.setMonitoredDirName("/tmp/wars/");
      appProvider.setScanInterval(1);
      appProvider.setDeploymentManager(deploymentManager);
      appProvider.setExtractWars(true);
  
      httpServer.addBean(deploymentManager);
      httpServer.addBean(contextHandlerCollection);
      httpServer.addBean(appProvider);
  
      httpServer.start();
  }
  </code></pre>
  
  <p>My WAR files deploy fine if I use the jetty-runner jar and deploy them individually, but with my above code I see output like this:</p>
  
  <pre><code>2013-01-16 15:34:30.571:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/sample,file:/private/var/folders/qg/1t5k32g9567cwwl7y6tfdhj40000gn/T/jetty-0.0.0.0-3030-sample.war-_sample-any-/webapp/},/private/tmp/wars/sample.war
  2013-01-16 15:34:30.571:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/sample,file:/private/var/folders/qg/1t5k32g9567cwwl7y6tfdhj40000gn/T/jetty-0.0.0.0-3030-sample.war-_sample-any-/webapp/},/private/tmp/wars/sample.war
  2013-01-16 15:34:30.571:DBUG:oejuc.AbstractLifeCycle:starting HelloServlet
  </code></pre>
  
  <p>(there's lots more debug text indicating that my webapp is started and lives at <code>/sample</code>)</p>
  
  <p>When I visit <code>127.0.0.1:3030/sample</code> (I put the server at port 3030), I get a 404 message, and Jetty logs</p>
  
  <pre><code>2013-01-16 15:34:47.799:DBUG:oejs.Server:REQUEST /sample on AsyncHttpConnection@63ce0072,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
  2013-01-16 15:34:47.799:DBUG:oejs.Server:RESPONSE /sample  200 handled=false
  </code></pre>
  
  <p>I can't figure out what I'm missing.  Does anyone have a working example of this sort of setup?</p>