I see what you are saying about using the ActionForm.. The forward I'm
mapping to is not a Struts action but a servlet mapping specified in the
web.xml.. It's an older servlet created before we started using struts so it
does have to get the required parameters from the request object

-----Original Message-----
From: None None [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 2:44 PM
To: [EMAIL PROTECTED]
Subject: RE: forwarding to action needing different request parameters


I'm pretty new to Struts, and it's entirely possible I'm not following what 
your saying, but...

If the first Action is getting an ActionForm with the four parameters 
populated, you can simply instantiate the second Action, passing it the 
ActionForm, and then return from the first Action the ActionForward returned

by the second (or to another of the first, whatever you need).

Likewise, you can always instantiate your own ActionForm instance and pass 
that to the second Action, setting it up however you wish.

If I'm getting what your saying, I  think it's as easy as that.  But, it 
sounded like you are maybe grabbing the request parameters directly from the

request object instead of using an ActionForm... if that's the case, there's

still nothing to stop you from using an ActionForm for the second Action as 
input.  That way you could populate the original request parameters, or put 
new values in their place, whatever you want.

I can tell you that adding parameters to the request object it not allowed, 
although I remember something about that being added in a later servlet 
spec.  I do not know what version it IS allowed in, if that version even 
exists yet.


>From: "Nimmons, Buster" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts2 (E-mail)" <[EMAIL PROTECTED]>
>Subject: forwarding to action needing different request parameters
>Date: Wed, 12 May 2004 13:55:52 -0500
>
>I have an Action which is usualy accessed from an html form page... It
>requires 4 request parameters. I need to forward to this action from 
>another
>action but the action I'm forwarding from does not have all 4 of the 
>reuired
>request parameters. I know what the value of the parameters should be but I
>cannot put them in the request scope unless I use request.setAttribute()
>however the action being forwarded to is not looking for the required
>parameters from the Attributes but the requestParametes.. has anyone 
>figured
>out an easy way to modify the available requestParameters before forwarding
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.com/go/onm00200415ave/direct/01/


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

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

Reply via email to