Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logging out

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a chat application that uses servlets. The applet client constantly uses GET within a loop to get new messages from the servlet. However, I need to send a "xxx has left the room." to all clients when xxx becomes disconnected to the servlet.
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I thought about the possible implementations. Can I put an object that implements HttpSessionBindingListener in session, that once the browser is clicked off, session will be invalidated, and HttpBindingListener can log the user off through unbound? But then will session be invalidated when user click the browser off?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic