wood burning stoves 2.0*
The moose likes Struts and the fly likes Global Forward with Redirect= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Global Forward with Redirect="true"" Watch "Global Forward with Redirect="true"" New topic
Author

Global Forward with Redirect="true"

Tom Williamson
Greenhorn

Joined: Sep 13, 2006
Posts: 9
Hi all:

I am using a Global Forward as follows:

<global-forwards>
<forward
name="PaymentProfile"
path="/CreditQueryWeb/TestSession.jsp"
redirect="true" />
</global-forwards>

"CreditQueryWeb" is the root context for another WAR on the same JVM.

The ActionForward is being found and constructed properly as verified with my debugger, but I am getting a 404.

I was expecting this to work since it is my understanding that RequestProcessor would process this a "redirect".

Is there a flaw in my understanding?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You are right in assuming that a forward with redirect="true" will be processed as a response.sendredirect(). What you're missing is the fact that whenever you wish to go to a URL outside the current web application (regardless of whether it's on the same server or not) you must specify the full URL including the "http://". This is true whether you use a Struts global forward or whether you use the response.sendRedirect() command directly.


Merrill
Consultant, Sima Solutions
Tom Williamson
Greenhorn

Joined: Sep 13, 2006
Posts: 9
Of course!! Thanks Merrill.
 
 
subject: Global Forward with Redirect="true"