This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
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.
Don't get me started about those stupid light bulbs.
subject: Global Forward with Redirect="true"
Similar Threads
how to send a message to login page ?
can one have multiple global-forward
Can I make a global forward pointing to an Action?
action forward problem : when "Failure"