connector.setHost(bindAddress.getHost());
connector.setPort(bindAddress.getPort());
connector.setServer(server);
server.setConnectors(new Connector[] { connector });
ContextHandler context_handler = new ContextHandler();
context_handler.setContextPath("/");
context_handler.setServer(server);
server.setHandler(context_handler);
SessionHandler session_handler = new SessionHandler();
context_handler.setHandler(session_handler);
ServletHandler servlet_handler = new ServletHandler();
session_handler.setHandler(servlet_handler);
ServletHolder holder = new ServletHolder();
holder.setName("httpTunnel");
holder.setClassName(HttpTunnelServlet.class.getName());
servlet_handler.setServlets(new ServletHolder[] { holder });
ServletMapping mapping = new ServletMapping();
mapping.setServletName("httpTunnel");
mapping.setPathSpec("/*");
servlet_handler.setServletMappings(new ServletMapping[] { mapping });
context_handler.setAttribute("acceptListener", getAcceptListener());
context_handler.setAttribute("wireFormat", getWireFormat());
server.start();
}