struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhinav Bhatnagar" <>
Subject RE: Adding parameter to local forwards
Date Mon, 13 Jun 2005 03:50:57 GMT

Thanks! That was new information for me.

For my application, the parameter value I want to pass is fixed, so I am
doing it in the struts-config path itself, something like this :

<action path="/SubmitDrawingUpload" type="SubmitDrawingUploadAction"
<forward name="showParentForm" path="/"/>

It works but please advise if it's proper.


-----Original Message-----
From: news [] On Behalf Of Laurie Harper
Sent: Saturday, June 11, 2005 12:25 AM
Subject: Re: Adding parameter to local forwards

If a redirect rather than a forward is acceptable, you can also look at
ActionRedirect (new in 1.2.7).

	ActionForward fwd = mapping.findForward(...);
         ActionRedirect ar = new ActionRedirect(fwd);
         ar.addParameter("name", f.getString("name"));
	return ar;


Michael Jouravlev wrote:

> Something like this:
> ActionForward af = mapping.findForward("showParentForm");
> return new ActionForward(
>   actionForward.getName(),
>   actionForward.getPath() + "?drawing_id=24",
>   actionForward.getRedirect()
> );
> You must create a new instance of ActionForward, you cannot change
> existing one, since it is frozen.
> Michael.
> On 6/10/05, Yuniar Setiawan <> wrote:
>>Hi all, I have a configuration like this one below:
>> <action path="/SubmitDrawingUpload" type="SubmitDrawingUploadAction"
>><forward name="showParentForm" path="/"/>
>> now inside the SubmitDrawingUploadAction class usually i just need
>>following statement to forward to :
>> return mapping.findForwards("showParentForm");
>> the question is, what if I want to add extra parameter?? so it would
>>forwarded into
>>how can I add that 'drawing_id' parameter from inside
>>SubmitDrawingUploadAction class
> ?

To unsubscribe, e-mail:
For additional commands, e-mail:

******************* CAUTION - Disclaimer ****************** This e-mail contains PRIVILEGED
AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not
the intended recipient, please notify the sender by e-mail and delete the original message.
Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other
person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage you may
sustain as a result of any virus in this e-mail. You should carry out your own virus checks
before opening the e-mail or attachment. Infosys reserves the right to monitor and review
the content of all messages sent to or from this e-mail address. Messages sent to or from
this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message