In struts you can redirect(not forward) to other page or site.
In your action instead of mapping.findforward use following code
ActionForward toAction= new ActionForward ();
ActionForward fromAction = mapping.findForward("targetURL");
toAction.setPath(fromAction.getPath());
toAction.set
Configure an Action Mapping like so:
http://www.omnytex.com"; redirect="true"
/>
That's all. If you need it to be a little more dynamic, like I notice you said
it was on the same server, if it might be moved from server to server, than get
a reference to the forward above in your Action,
From: "Michael Oliver" <[EMAIL PROTECTED]>
> Thanks except in your example your forward isn't "outside" it is to an
> action in that struts application, I want to go to a URL outside the
> application, elsewhere on the same server but not to an action or jsp
> page.
Do the redirect yourself, and r
uary 27, 2005 12:11 PM
To: Struts Users Mailing List
Subject: Re: How to Forward out of struts to a URL from an Action
Hi Michael,
have a look in your struts-config.xml.
Greets Mark
Michael Oliver wrote:
>I would like to forward the user out of struts to a URL after
Hi Michael,
have a look in your struts-config.xml.
Greets Mark
Michael Oliver wrote:
I would like to forward the user out of struts to a URL after an action
executes without additional user input, what is the best way in Struts?
I can use a page that has a redirect javascript in it,
Your action should choose a forward with its redirect attribute set to true:
Thanks,
Paul
-Original Message-
From: Michael Oliver [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 2:54 PM
To: struts-user@jakarta.apache.org
Subject: How to Forward out of struts to a URL from
I would like to forward the user out of struts to a URL after an action
executes without additional user input, what is the best way in Struts?
I can use a page that has a redirect javascript in it, but is there a
facility in Struts to do this?
Michael Oliver
CTO
Alarius Systems LLC
3325 N.
7 matches
Mail list logo