struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitris Mouchritsas <dimitris.mouchrit...@eurodyn.com>
Subject Re: Showing messages after a redirect
Date Wed, 02 Jul 2008 07:26:34 GMT
Adam Hardy wrote:
> Dimitris Mouchritsas on 01/07/08 16:50, wrote:
>>>
>> Yes, for Struts 1.3.8, sorry I forgot to mention. Actually what I did 
>> (but
>> it's more or less specific for the action) is to just forward, not 
>> redirect.
>> But I've got another question now? Is there a way I can pass a 
>> parameter in
>> the request? I need to pass an id for an Account when I go back to the
>> Prepare action. But since I'm not manipulating the url?....
>
> And you can pass a parameter in the request if you built a new Forward 
> based on the one you want and construct the URL manually. I dug this 
> out of an old app:
>
> forward = mapping.findForward(origForward);
> forwardName = forward.getName();
> redirect = forward.getRedirect();
> //change URL if different URL given
> forwardUrl = "/somewhere/else";
> forwardUrl += "?" + customQueryString;
> forward = new ActionForward(forwardName, forwardUrl,
>     redirect);
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
Aaah, great; that seems to solve both of my problems :)
Thank you
Dimitris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message