aspose file tools*
The moose likes Servlets and the fly likes kill all user sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "kill all user sessions" Watch "kill all user sessions" New topic
Author

kill all user sessions

arunkumar subramanian
Ranch Hand

Joined: Jun 10, 2008
Posts: 32
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

Joined: Jan 10, 2002
Posts: 61224
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
arunkumar subramanian
Ranch Hand

Joined: Jun 10, 2008
Posts: 32
Thanks for your response.

How can I keep track of sessions? by implementing SessionListener?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61224
    
  66

Yes.
arunkumar subramanian
Ranch Hand

Joined: Jun 10, 2008
Posts: 32
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

Joined: Jan 10, 2002
Posts: 61224
    
  66

Record them in the application context as they are created.
arunkumar subramanian
Ranch Hand

Joined: Jun 10, 2008
Posts: 32
Thanks for your help. I will try it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: kill all user sessions