mardi 20 décembre 2016

How to know when session is close

I have webapp on java with database. When user logs in, i change field status in database to authorized. When someone tries to login under the same account, it says that someone is already logged in using this account. That's why I need to change that status field to "not_authorized" when session is closed (user close the browser). I know about ServletContextListener, but they are used in application initializing and destroying. And I need the same stuff for Session. Smth like Session listener with method SessionDestroyed. Is there any way to do this? TY a lot




Aucun commentaire:

Enregistrer un commentaire