You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/03/15 15:41:38 UTC
[jira] [Issue Comment Edited] (WW-3773) CreateSessionInterceptor
and HttpSessionListener do not cooperate well
[ https://issues.apache.org/jira/browse/WW-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230205#comment-13230205 ]
Lukasz Lenart edited comment on WW-3773 at 3/15/12 2:41 PM:
------------------------------------------------------------
Simple
{code}
ServletActionContext.getContext().setSession(new SessionMap<String, Object>(ServletActionContext.getRequest()));
{code}
should solve problem, right ?
was (Author: lukaszlenart):
Simple
{code java}
ServletActionContext.getContext().setSession(new SessionMap<String, Object>(ServletActionContext.getRequest()));
{code}
should solve problem, right ?
> CreateSessionInterceptor and HttpSessionListener do not cooperate well
> ----------------------------------------------------------------------
>
> Key: WW-3773
> URL: https://issues.apache.org/jira/browse/WW-3773
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.3.1.2
> Reporter: Kris Coolsaet
> Priority: Minor
> Labels: httpsession, interceptors, session
>
> When the current http session has expired, a new http session can be automatically created by using a {{CreateSessionInterceptor}}. However, this new session is not 'synchronized' with the action context session, i.e., the map that is injected into any action that is {{SessionAware}}. This map is always empty, however a newly created http session need not necessarily be empty, for example when we register a {{HttpSessionListener}} with the web application that automatically adds something to the session. (May be useful if you want to avoid null checks when retrieving a known object from the session.)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira