Re: How to set a variable in session in the JSP

2010-06-22 Thread Kushan Jayathilake
> > request.getSession().getAttribute("var"); > > Thanks & Regards, > Mano > > -Original Message- > From: Kushan Jayathilake [mailto:kusha...@gmail.com] > Sent: Friday, June 18, 2010 10:32 AM > To: user@struts.apache.org > Subject: How to set a v

RE: How to set a variable in session in the JSP

2010-06-21 Thread Mano Dasanayaka
.apache.org Subject: How to set a variable in session in the JSP Hi Guys, Can anyone suggest me a way to set a variable in the session in the JSP and access that variable in the action class.. (variable must be set from the JSP file to the session) iam using struts 2.. is there anyway to do this..

Re: How to set a variable in session in the JSP

2010-06-17 Thread Kushan Jayathilake
Hi, Yeah Wes, you are correct, i was so stuck with this and couldnt see that i can straightly put that to the session from the Action class... Thank you so much for reminding me this -- Regards Kushan Jayathilake On Fri, Jun 18, 2010 at 11:03 AM, Wes Wannemacher wrote: > What you want i

Re: How to set a variable in session in the JSP

2010-06-17 Thread Wes Wannemacher
What you want is this - However, what i'm wondering right now is this - you have to expose "accountList" most likely by having a getter/setter combination on the action that is rendering the JSP that contains this tag. Assuming you are placing the variable in the session so that you can retriev

Re: How to set a variable in session in the JSP

2010-06-17 Thread Kushan Jayathilake
Hi, Thanks for replying... In my JSP i put the as you said, i want to get the value from the Action class and set that value in the session in the JSP, so i wrote, " scope="session"/> note that "accountList" is a java.util.List in the Action class, i want to get that list to the JSP and assig

Re: How to set a variable in session in the JSP

2010-06-17 Thread Wes Wannemacher
http://struts.apache.org/2.x/docs/set.html Notice particularly the "scope" attribute. -Wes On Fri, Jun 18, 2010 at 1:01 AM, Kushan Jayathilake wrote: > Hi Guys, > > Can anyone suggest me a way to set a variable in the session in the JSP and > access that variable in the action class.. (variable

How to set a variable in session in the JSP

2010-06-17 Thread Kushan Jayathilake
Hi Guys, Can anyone suggest me a way to set a variable in the session in the JSP and access that variable in the action class.. (variable must be set from the JSP file to the session) iam using struts 2.. is there anyway to do this..? -- Regards Kushan Jayathilake