-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mark,
Mark Menard wrote:
> Is there a way to dynamically parameterize a redirect result based on an
> http request parameter that you have used in the action your are redirecting
> from?
This isn't exactly struts-2 specific, if I'm reading this correctly.
> Is there a way to get a parameter that was passed to createPartyRoleType
> into the redirect on success?
One way to do it is like this, at the end of your action:
ActionForward next = mapping.findForward("redirect-action");
return new ActionForward(next.getPath() + "?id=" + id,
next.getRedirect());
There is also ActionRedirect, which essentially wraps an existing
ActionForward:
ActionRedirect next = new ActionRedirect(mapping.findForward("..."));
next.addParameter("id", id);
return next;
I personally think that ActionRedirect isn't good enough, and needs a
lot of improvement. I write my own class and submitted it as an
attachment to https://issues.apache.org/struts/browse/STR-2538, but
nobody seemed interested. Everyone is free to use this class if they'd like.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFVRAj9CaO5/Lv0PARArG7AKCMT5MGdFgUqR6WUWD2ptIxTI5odgCeJl5d
VfPtoSuUAzK49IUsAbF4F5k=
=Xoua
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]