Originally posted by bill wong: how to write a application to display online members with jsp?
Bill, your question is too ambiguous. [ December 05, 2004: Message edited by: Adeel Ansari ]
Joined: Dec 05, 2004
this is my db id login password level money country hero strength agility intelligence online setup location ecperience hp mp damage armor
when user online, 'online' will be set to '1' when user press offline button, 'online' will be set to '0' if user did not press offline button and terminal internet explorer, 'online' will set '1' forever I want to know server how to know user terminal ie so that 'online' can be set to '0'. thanks~
Joined: Aug 15, 2004
see HttpSessionListener it will guide you through.
Use HttpSessionListener to listen for sessions being created or removed. When one is, query the database for all users with a "1" in the online field. Update the data to a hashmap that is stored in a ServletContext attribute (so it is accessable by the entire web app).
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook