Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ActionForward: Redirect to action/page at different domain.

843836Jun 21 2005 — edited Jun 19 2008
Hello. (I've searched forum and didn't find anything similar to my problem.)

How do I change the domain from current to another one when redirecting using ActionForward? I have an action class that in some conditions should redirect to an application located at a different domain. Normally I am at http://www.domain1.com and do the following:
ActionForward fwd = new ActionForward();
fwd.setPath("/actions/load.do");
fwd.setRedirect(true);
Now being at domain1.com I have to do something like that:
ActionForward fwd = new ActionForward();
fwd.setPath("http://www.domain2.com/actions/load.do");
fwd.serRedirect(true);
However when run it, I am redirected to
http://www.domain1.com/http://www.domain2.com/actions/load.do

So to repeat the question, how do I make it go to domain2 from domain1?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 17 2008
Added on Jun 21 2005
10 comments
2,281 views