Re: How to session attributes Struts 2.0.6

2007-03-18 Thread tom tom
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 Acti

Re: How to session attributes Struts 2.0.6

2007-03-16 Thread Felipe Rodrigues
You can use the interceptor ServletConfig to get HTTPServletRequest and HTTPServletResponse. But hte best way is to implements SessionAware interface in your action class. Take a look at this link. http://struts.apache.org/2.x/docs/how-do-we-get-access-to-the-session.html regards, Felipe Trac

Re: How to session attributes Struts 2.0.6

2007-03-16 Thread Nils-Helge Garli
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 <[

Re: How to session attributes Struts 2.0.6

2007-03-16 Thread Nate Drake
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]

Re: How to session attributes Struts 2.0.6

2007-03-15 Thread tom tom
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 It works fine in a normal struts We

Re: How to session attributes Struts 2.0.6

2007-03-15 Thread Nate Drake
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: See these pages for more details: http://struts.apach