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

looking for code

Jardel Tan
Greenhorn

Joined: Sep 11, 2001
Posts: 14
anyone did any code that can show how many users that are currently connected to ur websites?
thanx..
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
If your web app was session-enabled, and your sessions were not non-expiring, I suppose you could create a HttpSessionListener to keep track of the total number of valid sessions at any given time.
Dave Soto
Ranch Hand

Joined: Sep 15, 2001
Posts: 55
Right... HTTP does NOT establish persistent connections, so the question "How many users are currently connected?" can have more than a couple interpretations...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: looking for code