You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Abhijeet Solanki <as...@cisco.com> on 2003/11/20 01:14:34 UTC

Session and Request data

Hi,

I came across following situation while trying to explore top.vm
(present in vm/navigations/html , jetspeed1.4b4) :

In top.vm, added

>From session: $!data.Session.getAttribute("search")

>From request: $!data.Request.getParameter("search")

<input name="search" type="text" size="8" maxlength="8"
value="$!data.Request.getParameter("search")">

<input name="go" type="submit" value="Go"> </td>

 

and in getContent(Rundata rundata)

rundata.getRequest().setAttribute("search", search);

rundata.getSession().setAttribute("search", search);

---

Whenever I hit "Go" with some text in input box, the return from request
data is fine but value of session data is not correct. "From session:"
shows last entry made in the search input box.

Am I doing something wrong here?

 

thanks,

Abhijeet


RE: Session and Request data

Posted by Abhijeet Solanki <as...@cisco.com>.
After some more investigation, it seems neither Request nor Session data
set in getContent is available in top.vm . 
Earlier when I mentioned that request data was available, that was
because the search field was getting populated at the time of form
submission and the same was getting retained in the $data.Request

Now the main question is, if this is by design?

-Abhijeet


-----Original Message-----
From: Abhijeet Solanki [mailto:asolanki@cisco.com] 
Sent: Wednesday, November 19, 2003 4:15 PM
To: jetspeed-user@jakarta.apache.org
Subject: Session and Request data


Hi,

I came across following situation while trying to explore top.vm
(present in vm/navigations/html , jetspeed1.4b4) :

In top.vm, added

>From session: $!data.Session.getAttribute("search")

>From request: $!data.Request.getParameter("search")

<input name="search" type="text" size="8" maxlength="8"
value="$!data.Request.getParameter("search")">

<input name="go" type="submit" value="Go"> </td>

 

and in getContent(Rundata rundata)

rundata.getRequest().setAttribute("search", search);

rundata.getSession().setAttribute("search", search);

---

Whenever I hit "Go" with some text in input box, the return from request
data is fine but value of session data is not correct. "From session:"
shows last entry made in the search input box.

Am I doing something wrong here?

 

thanks,

Abhijeet



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org