title: Can't get Jetty to scan for annotated classes
body: <p>I have an application with an embedded jetty server which I'm starting up like this (placed in main() and launched with eclipse):</p>
  
  <pre><code>Server server = new Server(port);
  
  WebAppContext context = new WebAppContext();
  context.setResourceBase("web/");
  context.setDescriptor("web/WEB-INF/web.xml");
  context.setConfigurations(new Configuration[]{
              new AnnotationConfiguration(), new WebXmlConfiguration(),
              new WebInfConfiguration(), new TagLibConfiguration(),
              new PlusConfiguration(), new MetaInfConfiguration(),
              new FragmentConfiguration(), new EnvConfiguration()});
  
  context.setContextPath("/");
  context.setParentLoaderPriority(true);
  server.setHandler(context);
  server.start();
  server.join();
  </code></pre>
  
  <p>My web.xml looks like this (empty for now, I'm not sure if I can remove it completely):</p>
  
  <pre><code>&lt;web-app 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://java.sun.com/xml/ns/javaee" 
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
      metadata-complete="false"
      version="3.0"&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>And I have a simple class set up like this:</p>
  
  <pre><code>import java.io.IOException;
  
  import javax.servlet.ServletException;
  import javax.servlet.annotation.WebServlet;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  @WebServlet(urlPatterns={"/test"})
  public class TestServlet extends HttpServlet {
  
      protected void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException  {
          request.getRequestDispatcher("/WEB-INF/html/index.html").forward(request,response);
      }
  }
  </code></pre>
  
  <p>My application works fine when I use traditional servlet mappings in web.xml.  But when I remove the web.xml mappings and use annotations, I only get 404s.  It doesn't look like it's scanning for annotations at all.  The console looks like this:</p>
  
  <pre><code>2012-08-01 17:40:37.021:INFO:oejs.Server:jetty-8.1.5.v20120716
  2012-08-01 17:40:37.227:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
  2012-08-01 17:40:37.294:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/Users/me/project/web/}
  2012-08-01 17:40:37.547:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/Users/me/project/web/}
  2012-08-01 17:40:37.547:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/Users/me/project/web/}
  2012-08-01 17:40:37.547:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/Users/me/project/web/}
  2012-08-01 17:40:37.641:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
  </code></pre>
  
  <p>Some things that I have checked already from my research:</p>
  
  <ul>
  <li>servlet-3.0 jar is in the classpath</li>
  <li>metadata-complete set to false in web.xml</li>
  <li>I made sure to include AnnotationConfiguration in web app context</li>
  </ul>
  
  <p>I've run out of ideas and am about to just revert back to the old web.xml, but it's killing me why I can't get this to work.</p>