...
One way of invalidating a session; contributed by Ray Clough.
Code Block | |||||||
---|---|---|---|---|---|---|---|
| |||||||
// Code fragment from class implementing SessionAware containing the // session map in a instance variable "session". Attempting to invalidate // an already-invalid session will result in an IllegalStateException. if (session instanceof org.apache.struts2.dispatcher.SessionMap) { try { ((org.apache.struts2.dispatcher.SessionMap) session).invalidate(); } catch (IllegalStateException e) { logger.error(msg, e); } } |