File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes how to write a application to display online members with jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to write a application to display online members with jsp?" Watch "how to write a application to display online members with jsp?" New topic
Author

how to write a application to display online members with jsp?

bill wong
Greenhorn

Joined: Dec 05, 2004
Posts: 2
how to write a application to display online members with jsp?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29244
    
139

Bill,
Welcome to JavaRanch!

Where are your online members stored? If they are in a database, you can use JDBC.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
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 ]
bill wong
Greenhorn

Joined: Dec 05, 2004
Posts: 2
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~
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
see HttpSessionListener it will guide you through.
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
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
Jay King
Greenhorn

Joined: Oct 19, 2004
Posts: 10
If the requirement is show "online users", the logged in users is only half of the problem. You need to display how many "Guests" are online as well.

- Jay
JavaRSS.com, Java News, Java Articles and Java Blogs, Just one Bookmark.
Jay King
Greenhorn

Joined: Oct 19, 2004
Posts: 10
If the requirement is show "online users", the logged in users is only half of the problem. You need to display how many "Guests" are online as well.

- Jay
JavaRSS.com, Java News, Java Articles and Java Blogs, Just one Bookmark.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to write a application to display online members with jsp?
 
Similar Threads
Shrikant-- Performance of Struts
Instant messaging, detect when user goes offline before his session expires
how to add panel dynamically
Jsp
javascript