struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Ventura <vent...@cit.com.br>
Subject Re: Setting request Parameter
Date Wed, 16 Apr 2003 14:48:50 GMT
I had this problem once. I created an utility class that searches for a
piece of request information. It first checks the request ATTRIBUTES, and
if the key is not found then it checks the request PARAMETERS.

This way, if I want to override some request parameter I can just set
an attribute and the utility will check it first. (I use this class
pretty much everywhere, and rarely use request.getParameter() :)

HTH
~jv

----- Original Message -----
From: "David Chelimsky" <david@chelimsky.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Wednesday, April 16, 2003 11:36 AM
Subject: Re: Setting request Parameter


> I don't believe there is a setParameter() equivalent to setAttribute().
> Is there any reason you can't use a request Attribute instead of a
> parameter? You could init the Attribute with the val of the Parameter
> and then use the Attribute...
>
> Renato Romano wrote:
>
> >I need to set a request Parameter, not an attribute ...
> >
> >____________________________________
> >Renato Romano
> >Sistemi e Telematica S.p.A.
> >Calata Grazie - Vial Al Molo Giano
> >16127 - GENOVA
> >
> >e-mail: r.romano@set-network.com
> >Tel.:   010 2712603
> >_____________________________________
> >
> >
> >-----Original Message-----
> >From: Greg Dunn [mailto:greg.dunn@mo.nisc.cc]
> >Sent: mercoledì 16 aprile 2003 16.10
> >To: Struts Users Mailing List; r.romano@set-network.com
> >Subject: RE: Setting request Parameter
> >
> >
> >
> >request.setAttribute(java.lang.String name, java.lang.Object o)
> >
> >Stores an attribute in the request.
> >
> >
> >Greg
> >
> >
> >-----Original Message-----
> >From: Renato Romano [mailto:r.romano@set-network.com]
> >Sent: Wednesday, April 16, 2003 9:11 AM
> >To: 'Struts Users Mailing List'
> >Subject: Setting request Parameter
> >
> >
> >I need to replace a request parameter inside an Action perform method,
> >based on runtime operations, before giving control to the view, that is
> >before returning mapping.findForward("forward"); I obviously cannot set
> >the parameter inside struts-config, because its value is run-time
> >computed, and cannot find a way to set it run-time... What I'd need is a
> >request.setParameter() method... Is there a way to do this ? Thanks
> >Renato
> >
> >____________________________________
> >Renato Romano
> >Sistemi e Telematica S.p.A.
> >Calata Grazie - Vial Al Molo Giano
> >16127 - GENOVA
> >
> >e-mail: r.romano@set-network.com
> >Tel.:   010 2712603
> >_____________________________________
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


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


Mime
View raw message