if (sessionManager == null) {
sessionManager = new HashSessionManager();
HashSessionIdManager idManager = new HashSessionIdManager();
sessionManager.setIdManager(idManager);
}
SessionHandler sessionHandler = new SessionHandler(sessionManager);
if (securityHandler != null) {
//use the securityHander which already wrap the jetty http handler
sessionHandler.setHandler(securityHandler);
} else {
sessionHandler.setHandler(handler);
}
context.setHandler(sessionHandler);
} else {
// otherwise, just the one.
if (securityHandler != null) {