aspose file tools*
The moose likes Servlets and the fly likes User List in Container Managed Security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "User List in Container Managed Security" Watch "User List in Container Managed Security" New topic
Author

User List in Container Managed Security

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
I am using Container Managed Security and want to list/count the number of users authenticated so far. What would be the best strategy to do this? The problem is that the spec defines authenticated user as having non-null value in request.getUserPrincipal(). How could I count the number of Principal objects maintained by the container?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

If the container doesn't allow a mechanism to exatract this information, you can look at ways to 'decorate' the login/logout process to maintain your own count. You can also add session listeners to track 'visitors' by finding sessions that do not have credentials attached.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: User List in Container Managed Security