Embedded Jetty handles each message twice <p>I'm trying to use Jetty in the simplest way possible. I have started by running the walkthrough from the Jetty@Eclipse documentation, which basically looks like that:</p> <pre><code>public class Main { public class HelloHandler extends AbstractHandler { public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html;charset=utf-8"); response.setStatus(HttpServletResponse.SC_OK); baseRequest.setHandled(true); response.getWriter().println("&lt;h1&gt;Hello World&lt;/h1&gt;"); } } private void run() throws Exception { Server server = new Server(8080); server.setHandler(new HelloHandler()); server.start(); server.join(); } public static void main(String[] args) throws Exception { Main m = new Main(); m.run(); } } </code></pre> <p>The problem is that <strong>the handler gets called twice on every request</strong>. I'm using Chrome with <em>http://localhost:8080</em> to simulate, if that makes any difference. Jetty is embedded as two jars:</p> <ul> <li>jetty-all-7.0.2.v20100331.jar</li> <li>servlet-api-2.5.jar</li> </ul> <p>What am I doing wrong/missing here?</p>