{
ServletContextHandler context = new ServletContextHandler(server, "/",
ServletContextHandler.NO_SECURITY | ServletContextHandler.NO_SESSIONS);
context.setConnectorNames(new String[] {connector.getName()});
DispatchingContinuationServlet servlet = new DispatchingContinuationServlet();
servlet.setDispatcher(new TreeDispatcher<HttpConsumer>());
Long timeout = endpoint.getContinuationTimeout() != null ? endpoint
.getContinuationTimeout() : getContinuationTimeout();
if (timeout != null) {
servlet.setContinuationTimeout(timeout);
}
ServletHolder holder = new ServletHolder();
holder.setServlet(servlet);
context.addServlet(holder, "/*");