This content has been marked as final.
Show 2 replies
-
1. Re: In an servlet ,how to get users list and roles list that is defined in jbossws-users.properties and jbossws-roles.properties?
jaikiran Aug 15, 2011 11:49 PM (in response to includeeasy)Which version of JBoss AS are you using?
-
2. Re: In an servlet ,how to get users list and roles list that is defined in jbossws-users.properties and jbossws-roles.properties?
includeeasy Aug 16, 2011 5:26 AM (in response to jaikiran)jboss-5.1.0.GA
I found on tomcat,it is very easy to get users:
In tomcat 7.0:
MemoryUser genericPrincipal = (MemoryUser) request.getUserPrincipal();
Iterator<User> userrs = genericPrincipal.getUserDatabase().getUsers();
while (userrs.hasNext()) {
User user = (User) userrs.next();
out.println(user.getName()+"<br/>");
}