Before in Struts1, I can set data to session/request in action class, then
display it in jsp..

In action class:  
request.setAttribute("aName", "aValue");  
request.getSession().setAttribute("bName, ""bValue");

then display value in jsp:  
<%= (String)request.getAttribute("aName")  %>
<%= (String)session.getAttribute("bName") %>


But in Struts2, how can I do that?
e.g. I used Mailreader sample code, I tried in action class, execute()
function, do this...
        Map mySession = this.getSession();
        mm.put("cName", "cValue");
        this.setSession(mm);

but in jsp, <%= session.getAttribute("cName") %> is null.

Any idea?
-- 
View this message in context: 
http://www.nabble.com/Struts2-set-data-to-session-tf2539904.html#a7076046
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to