Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

browser action setting

 
santhosh s samaka
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to update the mysql database when browser closed directly by user what i have to do!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, there is no 100% guaranteed way to do this. Why do you need to do it? What is the driver for this requirement?

 
santhosh s samaka
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually in my table i have a column for logout time when user closes the browser directly it is not updating table for that i need solution
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way is to make logout time also equals session timeout then you could use a session listener and update accordingly. That way you don;t need to catch browser events (which, like I said, you cannot do with 100% reliability).
 
santhosh s samaka
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi sorry i didnt get your solution properly
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An HttpSessionListener will tell you when sessions are destroyed. When your session times out (sue to user inactivety) you can use this to update your database table.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic