Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getUserPrincipal don't return user principal :(  RSS feed

Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!