title: Programmatically registering a servlet in Jetty 7
body: <p>I'm trying to register a Servlet in Jetty 7.0 programmatically.  All the examples I find are for Jetty 6, and Jetty 7 is quite different.  Here is my server side:</p>
  
  <pre><code>import org.eclipse.jetty.server.Server;
  import org.eclipse.jetty.servlet.ServletContextHandler;
  
  public class Bootstrapper {
       public static void main(String[] args) throws Exception{
           Server server = new Server(8080);
           ServletContextHandler servletContextHandler = new ServletContextHandler(server, "/context", true, false);
           servletContextHandler.addServlet(HessianService.class, "/hessian-service");
           server.start();
           System.out.println("started");
       }
  
  }
  </code></pre>
  
  <p>The result of this test is the sever starts, but the client fails on connect:  Caused by: java.io.FileNotFoundException: <a href="http://localhost:8080/hessian-service" rel="noreferrer">http://localhost:8080/hessian-service</a></p>
  
  <p>I see nothing in my browser at <a href="http://localhost:8080/hessian-service" rel="noreferrer">http://localhost:8080/hessian-service</a>.  Thanks</p>