Hi,
I have not played much with Struts 2 yet, so forgive me if this question is too
easy.
Inside an Action ActionA, I put an object into a session, like this :
public class ActionA extends ActionSupport {
...
Map session = ActionContext.getContext().getSession();
session.put("test", test1);
...
}
In my struts.xml, i have defined 2 actions :
<action name="doSomething" class="myActions.ActionA">
<result>pageA.jsp</result>
</action>
<action name="doSomethingElse" class="myActions.ActionB">
<result>pageB.jsp</result>
</action>
I can access that object from pageA.jsp, using OGNL expressions :
<s:property value="#session.test" /><br>
I cannot access that object from pageB.jsp :
<s:property value="#session.test" /><br>
How come ? Sessions objects are supposed to be accessed from anywhere in the
same session.
http://struts.apache.org/2.x/docs/accessing-application-session-request-objects.html
Thanks for helping.