[
https://issues.apache.org/jira/browse/WW-4600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124936#comment-15124936
]
Lukasz Lenart commented on WW-4600:
-----------------------------------
It isn't possible, those lines just update a {{Map}} and there is check if the
{{Map}} isn't {{null}}, see the code snippet below:
{code:java}
Map<String, Object> session = invocation.getInvocationContext().getSession();
if (session == null) {
LOG.debug("Could not store action [{}] error/messages into session, because
session hasn't been opened yet.", action);
return;
}
LOG.debug("Store action [{}] error/messages into session.", action);
ValidationAware validationAwareAction = (ValidationAware) action;
session.put(actionErrorsSessionKey, validationAwareAction.getActionErrors());
session.put(actionMessagesSessionKey,
validationAwareAction.getActionMessages());
session.put(fieldErrorsSessionKey, validationAwareAction.getFieldErrors());
{code}
https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java#L282-L295
> MessageStoreInterceptor throws Session already invalidated
> -----------------------------------------------------------
>
> Key: WW-4600
> URL: https://issues.apache.org/jira/browse/WW-4600
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Reporter: Alireza Fattahi
> Fix For: 2.5.x
>
>
> The MessageStoreInterceptor may throw the java.lang.IllegalStateException:
> getAttribute: Session already invalidated at line 289, if the action
> invalidte the session.
> Can this be solved ?!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)