• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Chat Applets

 
Greenhorn
Posts: 9
  • 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
 
Rancher
Posts: 43016
76
  • 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
  • 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
Posts: 43016
76
  • 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).
 
Ranch Hand
Posts: 225
Spring Notepad Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jamel Mohammad,
Is your problem solved?






***********************************
Tip: Sincerity is mother of all acheivements.
***********************************
 
    Bookmark Topic Watch Topic
  • New Topic