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


Kamal C. Mettananda wrote:
Hi,

I have seen that there has been an ActionForward class under Struts 1.x which 
could be used for a redirect to a completely different domain URL. But how can 
we achieve the same with Struts 2.

Thanks.

Kamal



Send instant messages to your online friends http://uk.messenger.yahoo.com
---------------------------------------------------------------------
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