Author and all-around good cowpoke
Joined: Mar 22, 2000
How many Users are accessing one website at any moment of time?
That depends on how you interpret the phrase. Watching sessions will give you some idea of the number of active Users in recent history but some will be long gone by the time their session times out. Using Tomcat's management interface I can see how many Threads are currently handling requests - is that what you had in mind? You could always increment (safely) a counter when the service method is entered and decrement it when exited.
In an effort to help you get the most from our forums, we've compiled a list of tips for asking questions here. You can find the list in our FAQ section here. In particular please see: UseAMeaningfulSubjectLine
Every question in the forum is "Regarding Servlets" so your subject line really tells us nothing about your question.
I've got a sample webapp on my site that shows one way of keeping track of sessions, who's logged in, how long they've been logged in, and what page they've accessed last. You can find it at: http://simple.souther.us/not-so-simple.html Look for SessionMonitor.