Package com.oorian
Class InvalidHttpSessionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.oorian.InvalidHttpSessionException
- All Implemented Interfaces:
Serializable
Unchecked exception thrown when an HTTP session is invalid, expired, or unavailable.
This exception is thrown by the Oorian framework when an operation requires a valid HTTP session but one cannot be obtained or is no longer valid. This typically occurs when a session has timed out, been invalidated, or when attempting to access session data outside the context of a valid HTTP request.
Common Causes:
- Session timeout due to inactivity
- Session explicitly invalidated via logout
- Server restart clearing all sessions
- Attempting to access session outside request context
- Session not created when required
Usage:
HttpSession session = request.getSession(false);
if (session == null || !session.isValid()) {
throw new InvalidHttpSessionException();
}
// Or in session management code:
public void requireValidSession() {
if (!hasValidSession()) {
throw new InvalidHttpSessionException();
}
}
- Since:
- 2025
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new InvalidHttpSessionException with a default error message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidHttpSessionException
public InvalidHttpSessionException()Constructs a new InvalidHttpSessionException with a default error message.The exception message is "Invalid HttpSession", which indicates that the HTTP session is either null, expired, or otherwise unusable.
-