+1
Adding a redirect:

public ActionForward executeActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws
Exception {
ActionForward forward = mapping.findForward("success");
String path = forward.getPath();
path += "?foo=bar";
return new ActionForward(path, true);
}

should work.

If you cant perform a redirect, you could wrap the request in a filter
and simulate a putParameter by overriding the getParameter... but I
think that it would be overkilling in your situation, so with the
redirect stuff you'll be done.


Saludos.
Guillermo.


-----Mensaje original-----
De: Erik Weber [mailto:[EMAIL PROTECTED] 
Enviado el: Martes, 24 de Agosto de 2004 05:57 p.m.
Para: Struts Users Mailing List
Asunto: Re: forward and set url parameter

public ActionForward executeActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws
Exception {
ActionForward forward = mapping.findForward("success");
String path = forward.getPath();
path += "?foo=bar";
return new ActionForward(path);
}

But in this case, I'm not sure why you wouldn't just use a request 
attribute instead. By forward, perhaps you mean redirect?

Or, in a JSP link:

<html-el:link page="/actor/usecase?param=${foo.bar}">blah</html-el:link>


Erik


Stefan Groschupf wrote:

> Hi,
>
> I wish to forward to a action that require a url parameter.
> request.setAttribute does not set a urlParameter in the style 
> showBla.do?pk=2323;
>
> How to set such a parameter, since request.getParameterMap().put() has

> no effect?
>
> Thanks for any hints.
> Stefan
>
>
> ---------------------------------------------------------------------
> 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]



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

Reply via email to