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" name="DrawingUploadForm"> <forward name="showParentForm" path="/DrawingUpdate.do?drawing_id=24"/> </action> It works but please advise if it's proper. Regards, Abhinav -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Saturday, June 11, 2005 12:25 AM To: user@struts.apache.org 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; L. 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 <[EMAIL PROTECTED]> wrote: > >>Hi all, I have a configuration like this one below: >> <action path="/SubmitDrawingUpload" type="SubmitDrawingUploadAction" >>name="DrawingUploadForm"> >><forward name="showParentForm" path="/DrawingUpdate.do"/> >></action> >> now inside the SubmitDrawingUploadAction class usually i just need the >>following statement to forward to DrawingUpdate.do : >> return mapping.findForwards("showParentForm"); >> the question is, what if I want to add extra parameter?? so it would be >>forwarded into DrawingUpdate.do?drawing_id=24 >>how can I add that 'drawing_id' parameter from inside >>SubmitDrawingUploadAction class > > ? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ******************* 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]