aspose file tools*
The moose likes Applets and the fly likes Chat Applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Chat Applets" Watch "Chat Applets" New topic
Author

Chat Applets

Jemal Mohammed
Greenhorn

Joined: Jul 05, 2007
Posts: 9
hello
I am developing a chat application using applet and servlet. I have got a problem in knowing the total number of users online and their names.

thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Don't the users need to log in (maybe using a password) before they can start chatting? That would provide you with the name sof all users online. You could drop someone from the list once they haven't posted in N minutes. Or the client applet could ping the server every so often, and if stops doing do, it must have been closed, so the user is definitely offline.


Ping & DNS - updated with new look and Ping home screen widget
Jemal Mohammed
Greenhorn

Joined: Jul 05, 2007
Posts: 9
that is okay. but is there any information stored on a cookie or servlet session showing weither a browser is closed or not?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Cookies and session store whatever you put in there. Nothing is put there automatically for you.

If you want to make a guess when the applet or browser has been closed, then you can do what I suggested (i.e., the client needs to ping the server in regular intervals).
Baseet Ahmed
Ranch Hand

Joined: Dec 18, 2006
Posts: 224
Jamel Mohammad,
Is your problem solved?






***********************************
Tip: Sincerity is mother of all acheivements.
***********************************
 
 
subject: Chat Applets
 
Similar Threads
Is chetan OK?
discussion room for students and faculty
WA #1.....word association
confused in overriding question
Servlet example - error 404: how to resolve? (what is wrong?)