aspose 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
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
 
Consider Paul's rocket mass heater.
 
subject: how to proof, if Session is invalidate()
 
Similar Threads
Qestions regarding sessions
session invalidate for session id
destroy sessionContext from EJB?
How to invalidate user's session forcefully
problem in logout procedure