The Tomcat "Management" app can display the number of active sessions per application and the number of active request Threads.
This topic comes up also in the
servlet forum.
Of course, the concept of a "connected user" is rather tricky - you have no way of being sure which page your user is currently looking at.
Bill