A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
how to proof, if Session is invalidate()
Joined: Jun 28, 2008
Sep 08, 2008 03:25:00
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:
Caused by: java.lang.IllegalStateException: invalidate: Session already invalidated at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1107) at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
if (!session.isInvalid) session.invalidate();
but there is no method like isInvalid.
Joined: Apr 14, 2004
Sep 08, 2008 03:29:00
You could just catch the exception and ignore it.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: how to proof, if Session is invalidate()
destroy sessionContext from EJB?
Qestions regarding sessions
session invalidate for session id
problem in logout procedure
How to invalidate user's session forcefully
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015