Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

kill all user sessions

 
arunkumar subramanian
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

How to kill all user sessions using servlets or how to kill user cookie?

We have a requirement to make the application non-editable for certain time. after that we will make the application editable. We will send out mail to users to logoff the application. Some users who does not logoff are able to use the application, this should be avoided. Since User information are stored as cookies, they were able to use the application.

Please let me know.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While you could invalidate the sessions by keeping track of them and iterating through the list, without a request/response cycle to the user's browser, there is no way to affect the cookie.
 
arunkumar subramanian
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response.

How can I keep track of sessions? by implementing SessionListener?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
arunkumar subramanian
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But how can I call session destroyed method from servlet? or how can I get the sessions that were created?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Record them in the application context as they are created.
 
arunkumar subramanian
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help. I will try it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic