File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to proof, if Session is invalidate() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to proof, if Session is invalidate()" Watch "how to proof, if Session is invalidate()" New topic
Author

how to proof, if Session is invalidate()

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
I want to proof if a session, that I want to destroy, is already destroyed. I cannot find any method like "Boolean isInvalid" in the HTTPSession.

I want to avoid this exception:


something like:

if (!session.isInvalid) session.invalidate();

but there is no method like isInvalid.

Any Ideas?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You could just catch the exception and ignore it.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to proof, if Session is invalidate()
 
Similar Threads
Qestions regarding sessions
session invalidate for session id
destroy sessionContext from EJB?
problem in logout procedure
How to invalidate user's session forcefully