Hi Luca, Don't know if this would work or not, just off the top of my head:
Create a class which implements the HttpSessionBindingListener Give it a static int varible numberOFCurrentLogins (or whatever) In the valueBound Method increase this variable by 1 and in the valueUnBound Method decrease it by 1. Both these methods belong to the HttpSessionBindingListener and need to be implemented. The ValueBound method is automatically called whenever the object is added to a session using the session.setAttribute() method. This means that the first jsp page a user will access adds the object to the session. The valueUnBound method will automatically be called as soon as the session ends (for whatever reason). (you could record other session details in the object as well of course) Because the numberOFCurrentLogins variable is static it should increase / decrease for every object. This works in my head, I have no idea if it works in reality or if it's practical hope so cheers Joel >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 8/2/02, 4:33:25 PM, Luca Ventura <[EMAIL PROTECTED]> wrote regarding R: How can I ckeck how many users are connected to a Web Site?: > I agree with Ben. > In fact I need to know not the number of successful logins but how many > users are connected in a particular moment. > Ben...can you tell me some hint or link on how to write a bean that tracks > sessions and keeps a tally of active sessions? > Thanks, > Luca ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
