PreHandler preHandler = preHandlerFactory.createHandler();
sessionHandler = handlerFactory.createHandler(preHandler);
} else {
sessionHandler = new SessionHandler();
}
JettySecurityHandler securityHandler = null;
if (securityRealmName != null) {
InternalJAASJettyRealm internalJAASJettyRealm = jettyContainer.addRealm(securityRealmName);
//wrap jetty realm with something that knows the dumb realmName
JAASJettyRealm realm = new JAASJettyRealm(realmName, internalJAASJettyRealm);
Subject defaultSubject = this.runAsSource.getDefaultSubject();
securityHandler = new JettySecurityHandler(authenticator, realm, policyContextID, defaultSubject);
}
ServletHandler servletHandler = new ServletHandler();
webAppContext = new TwistyWebAppContext(securityHandler, sessionHandler, servletHandler, null);