Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Global Forward with Redirect="true"

 
Tom Williamson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tom Williamson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course!! Thanks Merrill.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic