You want me to give away all my secrets, don't you?!? :)
If the list of parameters is static, then you can just retrieve them from properties of the action: <result type="redirect">${nextURL}?emailId=${emailId}&name=${name}</result> If it is a dynamic list, there is a org.apache.struts2.views.util.URLHelperclass that has utility methods for taking a base url, a map of parameters and creating a url string from that. (the method buildParametersString is what you want to look at) Tom p.s. this should probably be added to a faq somewhere On 1/8/07, Information Guzzler <[EMAIL PROTECTED]> wrote:
How about passing parameters along with the redirect? On 1/8/07, Tom Schneider <[EMAIL PROTECTED]> wrote: > > Interesting question. I had the same question when I started looking at > webwork. Here's what I do when I need to redirect to a different > domain. If it's a static url, you can just hard code the full url in > your struts.xml with a result type of redirect. If it's dynamic, > there's a little more work involved. First you have a property on your > action that is the url you want to go to. Second, in your sturts.xml > you have a result type of redirect, but the value is pulled from the > OGNL stack. For example: > > <result type="redirect">${nextURL}</result> > > nextURL is the property in your action that is populated dynamically. > It's not trivial to figure out, but it works pretty slick. > Tom >