Never did two lines make so much sense....:) I will get a valid ID I suppose..
I now realise why all the examples of the session listener just showed the number of sessions and not any data from the sessions. Is there a mechanism where if you have the a list of session identifiers you can access them in turn to get the user data stored in them? For anyone else looking for a solution to this there is also a HttpSessionAttributeListener that will fire when you add/update/remove an attribute to a session. If you have a User class that you add to the session you could watch for this and add/remove the username etc. to a static array. This may be what I'll end up using. If anyone else tries it with success please let me know. Anthony "Shapira, Yoav" wrote: > Howdy, > When the session is created it has no attributes, that's why it's empty. > You can't have put attributes there before it was created ;) > > Yoav Shapira > Millennium ChemInformatics > > >-----Original Message----- > >From: Anthony Cunningham [mailto:[EMAIL PROTECTED] > >Sent: Tuesday, August 05, 2003 2:54 AM > >To: Tomcat Users List; this > >Subject: Session Listener's Session Event session empty? > > > >Greetings, > > > >I am trying to make a page showing all the logged in users and possibly > >all their details (stored in the session). > >While searching I came across information about the HttpSessionListener > >interface and tried implementing that. > > > >However in Tomcat 4.0.1 and also 4.0.4 when sessionCreated is called, > >the session retrieved from from the session event object doesn't appear > >to contain the attributes I put there. Has anyone experienced this? > > > >Also if anyone has implemented this type of logged in user list in > >another way I'd be grateful for your advice. > > > > > >thanks in advance, > > > >Anthony > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > This e-mail, including any attachments, is a confidential business communication, > and may contain information that is confidential, proprietary and/or privileged. > This e-mail is intended only for the individual(s) to whom it is addressed, and may > not be saved, copied, printed, disclosed or used by anyone else. If you are not > the(an) intended recipient, please immediately delete this e-mail from your computer > system and notify the sender. Thank you. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
