We use the path as / for the cookie path that allows the session to be shared between context1 and context2. The JSESSIONID also remains the same when the request is forwarded.
Martin asked me if we the action is session aware. It was not implementing SessionAware interface even though session was accessed (using request.getSession()). Artifact of code from struts1, that part of the code did not change when we move the action to struts2. So decided to change it and use the session map provided by struts2. Once I have added SessionAware I am not able to reproduce the session invalid exception, did not have a problem reproducing the issue before. Is this expected? Thanks, Prasanth On 05/16/2018 10:40 AM, Yasser Zamani wrote: > > On 5/16/2018 7:23 PM, Prasanth wrote: >> Exception: java.lang.IllegalStateException: UT000010: Session is invalid >> r4yb7BtBx7fwmGbzMhgeyhvSFb3sAp6FhW6m-5Op >> at >> io.undertow.server.session.InMemorySessionManager$SessionImpl.getAttribute(InMemorySessionManager.java:481 >> at >> io.undertow.servlet.spec.HttpSessionImpl.getAttribute(HttpSessionImpl.java:122 >> at com.xxxxxx.xxxxxx.LoginAction.execute(LoginAction.java:76 > Could you see if "Best Practices: Cross-Context Dispatching and Session > Handling" [1] fixes your issue? However, it's about Servlets not Struts. > > Regards. > > [1] http://satworks.blogspot.com/2011/07/best-practices-cross-context.html > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org >