By definition HTTP is connectionless, so there isnt really a true user count.
A user reading, is busy but not in the server.
If you want to monitor all users you need to use cookies.

If you want to monitor concurrent users, then you could have a little thread safe routine at the start and end of your processeing routine that increments and decrements.
Need to make sure the counter is thread safe.

or you could use HttpSessionListener (your Thread count as you call it)
and set up a counter

These techniques are good for internal monitoring... when servlet needs to know how busy it is.

For server wide stuff I think you would have to build a filter that watches every request... could watch sessions, server contexts etc. If you google for Tomcat Monitoring you will find many tools built on this principle and do it yourself code...

Have fun....


----- Original Message ----- From: "Hoa Doan" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Thursday, April 05, 2007 10:39 PM
Subject: Tomcat 6 User Connected


How do you find out how many user are connected to the server? Do you get a thread count? if so how do you do that?


---------------------------------
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to