-
Bug
-
Resolution: Obsolete
-
Minor
-
JBossAS-4.2.2.GA
-
None
If WebAuthentication is used and no security-constraint is defined in web.xml, the principal is not retained between requests. The code snippet performing the authentication is almost the same as in the wiki:
WebAuthentication webAuth = new WebAuthentication();
webAuth.login(username, password);
System.out.println(request.getUserPrincipal());
The call to request.getUserPrincipal() gives back the correct user name.
When I access the web application for the second time, a call to request.getUserPrincipal() returns null.