Tracking requests without counting



Hello,

In a Servlet (in Tomcat) is there a way to obtain the number of active
sessions or current requests without having to create some kind of
counter which is incremented as sessions arrive (maybe through a
filter) and decremented as sessions leave (maybe through a filter).

For example, is there something in the ServletContext or anything
similar?

I think the Tomcat manager displays the number of current sessions,
does it use an API for this? If so, can I use the same API within a
servlet?

Many thanks,
Jack
.



Relevant Pages

  • when to serialize/unserialize
    ... That means I can have a complex HTML form that submits ... iteratively back to the server for interim updates, ... anything about serialize/unserialize in Java servlet programming. ... I've been trying to learn how php sessions work. ...
    (comp.lang.php)
  • Re: Tracking requests without counting
    ... In a Servlet (in Tomcat) is there a way to obtain the number of active ... sessions or current requests without having to create some kind of ... does it use an API for this? ...
    (comp.lang.java.programmer)
  • Servlet Session Management Question
    ... If multiple browsers access a Servlet, ... for each browser, Does the Servlet have all of the information it ... needs to be able to pick and choose across those sessions, ... purposes of terminating a specific session? ...
    (comp.lang.java.programmer)
  • Servlet, Sessions e Server restarts
    ... I've a site (consisting in one Servlet) that has a reserved section ... (therefore, with sessions). ... Hoster Server, it give me the messagge "Object Update" more times, also ...
    (comp.lang.java.programmer)
  • java apps and php apps sharing sessions
    ... we run a ColdFusion/PHP/Javaenvironment and I'll probably ... figure out a way for all apps to be able to share sessions. ... servlet which can be called by PHP and ColdFusion. ...
    (comp.lang.php)