Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Chat Applets

 
Jemal Mohammed
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jemal Mohammed
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 225
Java Notepad Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jamel Mohammad,
Is your problem solved?






***********************************
Tip: Sincerity is mother of all acheivements.
***********************************
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic