Gunnar Hillert wrote:
Thanks for your helpful post! Interestingly, this also works with redirect actions.
Hrm... The javadoc for ServletActionRedirectResult says:
This result uses the ActionMapper provided by the ActionMapperFactory to redirect the browser to a URL that invokes the specified action and (optional) namespace. This is better than the ServletRedirectResult because it does not require you to encode the URL patterns processed by the ActionMapper in to your struts.xml configuration files. This means you can change your URL patterns at any point and your application will still work. It is strongly recommended that if you are redirecting to another action, you use this result rather than the standard redirect result.
So it is clearly indicated that "redirectAction" is recommended over "redirect", but I neither understand why, nor quite what it is that this result type does... ...it's still sending a redirect to the browser and causing the browser to send a new request, correct? If so, the new request needs to have the same URL (which must be encoded) no matter which result type generated the redirect, correct? So what is it that this does better than plain old "redirect"? Is it just that you can use structure the request params in xml instead of constructing them inline from ognl expressions?
If so, shouldn't this example:
<result name="success" type="redirectAction"> mySuccess?fooId=${fooId}${bartId ? "&barId=" + barId : ""} </result>
instead be: <result name="success" type="redirectAction"> <param name="actionName">mySuccess</param> <param name="fooId">${fooId}</param> <param name="barId">${barId}</param> </result> -Dale --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]