sessionHandler = handlerFactory.createHandler(preHandler);
} else {
sessionHandler = new SessionHandler();
}
//TODO construct an interceptor chain inside one of the Handlers.
JettySecurityHandler securityHandler = null;
if (securityRealmName != null) {
securityHandler = new JettySecurityHandler();
InternalJAASJettyRealm internalJAASJettyRealm = jettyContainer.addRealm(securityRealmName);
//wrap jetty realm with something that knows the dumb realmName
JAASJettyRealm realm = new JAASJettyRealm(realmName, internalJAASJettyRealm);
securityHandler.setUserRealm(realm);
securityHandler.init(policyContextID, defaultPrincipal, checkedPermissions, excludedPermissions, classLoader);
}
ServletHandler servletHandler = new ServletHandler();
webAppContext = new WebAppContext(securityHandler, sessionHandler, servletHandler, null);