File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes getUserPrincipal don't return user principal :( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "getUserPrincipal don Watch "getUserPrincipal don New topic

getUserPrincipal don't return user principal :(

alexandre russel

Joined: Nov 28, 2005
Posts: 16
I created a login module with JBoss. It create the callerPrincipal:
SimpleGroup roles = new SimpleGroup("Roles");
SimpleGroup callerPrincipal = new SimpleGroup("CallerPrincipal");
SimpleGroup cpLogin = new SimpleGroup("login");
cpLogin.addMember(new SimplePrincipal("my login name"));
SimpleGroup cpId = new SimpleGroup("id");
cpId.addMember(new SimplePrincipal("my id"));
roles.addMember(new SimplePrincipal("manager"));
Group[] roleSets = {roles, callerPrincipal};

the log file gives me: CallerPrincipal(members:login(members:my login name),id(members:my id))

Everything is fine but when I call userPrincipal from a JSP: group = ( request.getUserPrincipal();
<%= group.toString() %><br/>

then only the first member of the callerPrincipal group is there .
login(members:my login)

How can I access the rest of my group?
thanks for your help.
I agree. Here's the link:
subject: getUserPrincipal don't return user principal :(
jQuery in Action, 3rd edition