title: Unable to get Jetty HelloWorld example to work
body: <p>Edit: It appears that this problem may be localized to the version of javax.servlet I'm using. I got 2.5 from the site and it wasn't working, though using a different version I got from a demo project my prof published, it seems to work. Not sure exactly which version it is though.</p>
  
  <hr>
  
  <p>Using the following code from <a href="https://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld" rel="nofollow">https://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld</a>, I seem to be getting nowhere, and I have no idea why...</p>
  
  <pre><code>import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletException;
  
  import java.io.IOException;
  
  import org.eclipse.jetty.server.Server;
  import org.eclipse.jetty.server.Request;
  import org.eclipse.jetty.server.handler.AbstractHandler;
  
  public class HelloWorld 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;");
      }
  
      public static void main(String[] args) throws Exception
      {
          Server server = new Server(8080);
          server.setHandler(new HelloWorld());
  
          server.start();
          server.join();
      }
  }
  </code></pre>
  
  <p>I've downloaded the two jar files it says to, and compiled and ran the program with the following:</p>
  
  <pre><code>Q:\Documents\Development\Eclipse\3715a5\src&gt;javac -cp "..\lib\*;." HelloWorld.java
  Q:\Documents\Development\Eclipse\3715a5\src&gt;java -cp "..\lib\*;." HelloWorld
  </code></pre>
  
  <p>I have the following output on my standard output when I run:</p>
  
  <pre><code>2014-03-18 00:09:57.825:INFO::main: Logging initialized @89ms
  2014-03-18 00:09:57.872:INFO:oejs.Server:main: jetty-9.1.3.v20140225
  2014-03-18 00:09:57.913:INFO:oejs.ServerConnector:main: Started ServerConnector@edd9de{HTTP/1.1}{0.0.0.0:8080}
  2014-03-18 00:09:57.915:INFO:oejs.Server:main: Started @182ms
  </code></pre>
  
  <p>But when I use any web browser to browse to <code>http://localhost:8080</code>, I get nothing. I try using putty to connect to localhost:8080 via telnet, and I get "Software cause connection abort". I've disabled my windows firewall just to be certain, and I'm not getting anywhere.</p>