title: https servlet with Jetty
body: <p>I wrote a simple https servlet with Jetty according to the documentation which for some reason does not work. No error messages, nothing... the browser connects to the servlet, but that's it - after the connection it hangs forever. Here is the code:</p>
  
  <pre><code>    SslSocketConnector sslConnector =  new SslSocketConnector();
      sslConnector.setPort(5555);
      sslConnector.setKeystore(null);
      sslConnector.setHost("localhost");
      ((AbstractConnector) connector).setThreadPool(new QueuedThreadPool(20));
      server.addConnector (sslConnector);
  
  
  ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
      context.setContextPath("/");
  
      HandlerList handlers = new HandlerList();
  
      handlers.setHandlers(new Handler[] {context, new DefaultHandler() });
      server.setHandler(handlers);
  
      MyServlet servlet = new MyServlet();
      context.addServlet(new ServletHolder(servlet), "/*");
  
      server.start();
      server.join();       
  </code></pre>