You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sony Thomas <so...@genialgenetics.com> on 2006/01/20 14:47:34 UTC
Manipulating reques object ???? - urgent please
Hi,
Is there is any way to manipulate the value of request object. I have a
text field in my jsp called "locationName". when I use
"request.getParamentName("locationName") in my action, I am getting the
value entered in my jsp. While forwarding from my action, if i want to
reset the value
of locationName to a different value - what should I do? How can I do ?
please give me some clues???
thanks in advance
sony
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Manipulating reques object ???? - urgent please
Posted by Dave Newton <ne...@pingsite.com>.
Sony Thomas wrote:
> Is there is any way to manipulate the value of request object. I have
> a text field in my jsp called "locationName". when I use
> "request.getParamentName("locationName") in my action, I am getting
> the value entered in my jsp. While forwarding from my action, if i
> want to reset the value of locationName to a different value - what
> should I do? How can I do ? please give me some clues???
You should do it some other way, most likely by setting an attribute, or
by using a modified value further downstream.
The parameter map is immutable: if it was mutable then they wouldn't
necessarily be the request parameters anymore.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Manipulating reques object ???? - urgent please
Posted by David Delbecq <de...@oma.be>.
put get/set locationName in your struts form,
in your jsp use <html:text property="locationName"/>
httpservletrequest does not have a setParameter method.
Le Vendredi 20 Janvier 2006 14:47, Sony Thomas a écrit :
> Hi,
>
> Is there is any way to manipulate the value of request object. I have a
> text field in my jsp called "locationName". when I use
> "request.getParamentName("locationName") in my action, I am getting the
> value entered in my jsp. While forwarding from my action, if i want to
> reset the value
> of locationName to a different value - what should I do? How can I do ?
> please give me some clues???
>
> thanks in advance
>
>
> sony
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
David Delbecq
Royal Meteorological Institute of Belgium
-
Pingouins dans les champs, hiver méchant
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Manipulating reques object ???? - urgent please
Posted by Wendy Smoak <ws...@gmail.com>.
On 1/20/06, Sony Thomas <so...@genialgenetics.com> wrote:
> Is there is any way to manipulate the value of request object. I have a
> text field in my jsp called "locationName". when I use
> "request.getParamentName("locationName") in my action, I am getting the
> value entered in my jsp. While forwarding from my action, if i want to
> reset the value
> of locationName to a different value - what should I do? How can I do ?
> please give me some clues???
Since you're asking on the Struts list, the typical way to do this
would be to let the framework populate a form bean for you. Then in
the Action code you can change the form bean's property values.
form.setLocationName(...);
If you aren't using forms, you can set request _attributes_ (rather
than parameters). Try
request.setAttribute(...); . The setAttribute method is also
available for session and application scope.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org