tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shahab <>
Subject how to set JAAS Subject in HTTPSession
Date Wed, 25 Apr 2007 04:05:34 GMT


I would need help with the following -
I am trying to implement JAAS authentication using struts2. I have
implemented the following flow -
user request -> struts action -> login() -> loginModule (implements

this login module validates userid, password and  in the commit(), it
creates a Principal and adds the principal in the Subject.

My qn is how do I set this Subject in the HttpSession so that I can retrieve
it later, like below -
HttpServletRequest request = ServletActionContext.getRequest();
Principal principal = request.getUserPrincipal();

Please help.
View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message