// Set the default users and roles for the realm (note that realm name *must* match web.xml <realm-name>
HashLoginService loginService = new HashLoginService( "JSPWikiRealm" );
loginService.putUser( Users.ADMIN, new Password(Users.ADMIN_PASS), new String[] {"Authenticated", "Admin"} );
loginService.putUser( Users.JANNE, new Password(Users.JANNE_PASS), new String[] {"Authenticated"} );
WebAppContext webAppContext = new WebAppContext(path, context);
// Add a security handler.
SecurityHandler csh = new ConstraintSecurityHandler();
csh.setLoginService( loginService );
webAppContext.setSecurityHandler( csh );
log.error( "Adding webapp " + context + " for path " + path );
handlerCollection.addHandler( webAppContext );
}