Alternatively, if you want to avoid constructing the query string
manually, you can use the ActionRedirect class (as of 1.2.7 I believe). 
This has an addParameter() method specifically for this.  Typically, you
would pass an existing ActionForward instance to ActionRedirects'
constuctor to copy its configuration...

ActionForward af = new ActionRedirect(mapping.findForward("theForward"));
af.addParameter("myParam", "val");
return af;

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Tue, November 8, 2005 10:02 am, Borislav Sabev said:
> Deepa Khetan wrote:
>
>>Hi,
>> I am trying to add a parameter at runtime in ActionMapping of my Action
>>Class. I am using mapping.setParameter() for this. It gives an
>>IllegalStateException saying Configuration file is frozen. Is there a way
>> in
>>which i can add a parameter at runtime??
>> Regards,
>>Deepa
>>
>>
>>
> Hi Deepa,
> you have to construct a new ActionForward object and then return it.
> here is an example:
>             ActionForward fwd =
> mapping.findForward(Constants.ACTIONFORWARD_SUCCESS);
>             String path = fwd.getPath();
>             path += "&myparam=";
>             path += someparamvalue;
>              return  new ActionForward(path);
>
> regards
> borislav
>
>
>
>
> ---------------------------------------------------------------------
> 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