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.
Right... HTTP does NOT establish persistent connections, so the question "How many users are currently connected?" can have more than a couple interpretations...
A teeny tiny vulgar attempt to get you to buy our stuff
Gift giving made easy with the permaculture playing cards