Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JAAS subject tomcat

Status
Not open for further replies.

john307rnr

Programmer
Aug 10, 2002
10
DE
when a user is authenticated with jaas a subject is created. how do i store the subject in the container of the web application and how can i use it later in another jsp page ?
 
you can store it in the user session. e.g.

Code:
Subject sub = ......
session.setAttribute("subject", sub);

later in the session, the Subject can be retrieved by
Code:
Subject sub = (Subject)session.getAttribute("subject")

 
thanks byam, works fine. have you any experience in configuring the jaasrealm for tomcat ?
 
I have no experience on Tomcat JAAS Realm. If you already have your JAAS framework implemented. You can configure tomcat Realm to use org.apache.catalina.realm.JAASRealm with your associated JAAS classes as parameters. Here is an example I've found.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top