Hi Ron,

We're actually talking about two different things... there are request
PARAMETERS and request ATTRIBUTES.  What you say is of course accurate,
you can call setAttribute() on a request and forward it along and you'll
have access to those attributes.  But that is different from parameters. 
They are stored in two different collections, and are accessed with two
different methods (getAttribute() as opposed to getParameter()).

Parameters can only be attached to a request by appending a query string
to the URI being requested, or POSTing a form that includes them.  The
servlet spec, up to and including 2.4 apparently, does not provide a way
to add parameters, only attributes.

Frank

On Wed, September 14, 2005 2:51 am, Holshausen, Ron said:
> If you want to just forward the request along, just add any parameters
> to the request object via the setAttribute method.
>
> -----Original Message-----
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 14 September 2005 08:46
> To: Struts Users Mailing List
> Subject: Re: Adding parameters to redirected forwards
>
> Xavier Vanderstukken wrote:
>> IS that class really performs a redirect request?
>> Can I use the setRedirect method to false to performs a forward with
>> parameters?
>
> Interesting question... someone can correct me if I'm wrong, but I
> believe the answer is no.  Well, to be more precise, you *may* be able
> tp setRedirect(false) to do a forward, I do not know for sure, but you
> won't be able to add parameters.
>
> Up to and including servlet spec 2.4, there is no addParameter() method
> of HttpServletRequest, or any superclass.  Since when you do a forward
> you are passing the same request along, you would need this method to
> add parameters.
>
> When you do a redirect however, the URL you redirect to includes the
> parameters as a query string.
>
> So, no, I do not believe it is ever possible, with ActionRedirect or
> not, to add parameters when doing a forward, only when doing a redirect.
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>> .
>>
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> E-Mail Disclaimer
>
> Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene
> Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung
> reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach.
> Beachten Sie bitte, dass jede Form der unautorisierten Nutzung,
> Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser
> E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer
> den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie
> nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein,
> so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu
> setzen.
>
>
> For legal and security reasons the information provided in this e-mail is
> not
> legally binding. Upon request we would be pleased to provide you with a
> legally
> binding confirmation in written form. Any form of unauthorised use,
> publication,
> reproduction, copying or disclosure of the content of this e-mail is not
> permitted.
> This message is exclusively for the person addressed or their
> representative.
> If you are not the intended recipient of this message and its contents,
> please
> notify the sender immediately.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to