Hi,
It was my mistake I was refering to the wrong Action
class in my struts.xml
Please find my observations with regard to the portlet
session handling
1) I implemented the SessionAware interface and it's
method setSession and add the session attributes, This
works with no issues
2) in the
Can't help you out with that problem, as I haven't played with the Portlet
stuff. Sorry.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi!
This is probably a missing feature in the portlet framework. The
SessionAware interface aparently doesn't work when inside a portlet.
The other approach you use should work, but if it doesn't, try using
the ActionContext to get the session map and put it there.
Nils-H
On 3/16/07, tom tom
]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/How-to-session-attributes-Struts-2.0.6-tf3406479.html#a9520542
Sent from the Struts - User mailing list archive at Nabble.com
Have your action implement SessionAware, and give it a setter of the form:
public void setSession(Map session);
You can then add things to this map, and they will be added into the session.
Then you can access them in your JSP like this:
s:property value=#session\['NAME'\]/
See these pages
Hi,
I implemented the following interface
org.apache.struts2.interceptor.SessionAware;
hence implemented the
public void setSession(Map session) method and did add
the following attribute
session.put(NAME,USER1);
and in my jsp I have the following
s:property value=#session.NAME/ br
It
Hi,
How can we set the session variables which we used to
do in stuts 1.x. and thereafter access in the jsps.
e.g.
session.setAttribute(NAME,USER11);
and in jsp
logic:equal name=NAME value=USER11
This message is for user 1
/logic:equal
How can we access to the session, should it
7 matches
Mail list logo