SessionHandler sessionHandler = new SessionHandler(new HashSessionManager());
sessionHandler.getSessionManager().setIdManager(new HashSessionIdManager());
handler.setSessionHandler(sessionHandler);
if(secure) {
Constraint constraint = new Constraint();
constraint.setName(Constraint.__FORM_AUTH);
constraint.setRoles(new String[] {
"super", "admin", "guest"
});
constraint.setAuthenticate(true);
ConstraintMapping cm = new ConstraintMapping();
cm.setConstraint(constraint);
cm.setPathSpec("/webapp/graph-editor/*");