Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes Session Deletion help. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Session Deletion help." Watch "Session Deletion help." New topic
Author

Session Deletion help.

Fritz Largosa
Ranch Hand

Joined: Sep 12, 2005
Posts: 70
Is it possible for a jsp page to delete all sessions? I have googled this but have not found any useful solution.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

No. Why?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Fritz Largosa
Ranch Hand

Joined: Sep 12, 2005
Posts: 70
I want to discard session data, everytime a user logs out.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

But in that case you would only want to "delete" (real term: "invalidate") one session - the session belonging to the user who submitted the request. You would want to leave everybody else's session alone. No?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

You can invalidate the user's session. Nothing more.
Fritz Largosa
Ranch Hand

Joined: Sep 12, 2005
Posts: 70
so when I call session.invalidate() does that invalidate all sessions of everyone connected or just that one user?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

As I said.
ak pillai
author
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
no, only a particular users' session.


java j2ee job interview questions with answers | Learn the core concepts and the key areas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session Deletion help.