ServletContextHandler context = new ServletContextHandler(server, CONTEXT_PATH, ServletContextHandler.SESSIONS);
context.addServlet(servletHolder, SERVLET_PATH + "/*");
if (nodeName != null)
{
AbstractSessionIdManager sessionIdManager = new HashSessionIdManager();
sessionIdManager.setWorkerName(nodeName);
server.setSessionIdManager(sessionIdManager);
}
return server;
}