File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Global Forward with Redirect="true"" Watch "Global Forward with Redirect="true"" New topic

Global Forward with Redirect="true"

Tom Williamson

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

I am using a Global Forward as follows:

redirect="true" />

"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.

Consultant, Sima Solutions
Tom Williamson

Joined: Sep 13, 2006
Posts: 9
Of course!! Thanks Merrill.
I agree. Here's the link:
subject: Global Forward with Redirect="true"
It's not a secret anymore!