Use this:

<action-mappings>
  <action    path="/OrderSubmit"
    type="net.windward.store.OrderAction"
    name="orderForm"
    validate="true"
    input="/order.jsp">
   <forward name="success" path="/terms.jsp" redirect="true"/>
   <forward name="failure" path="/order.jsp"/>
  </action>
 </action-mappings>

But keep in mind that it will be a separate request at that point, so
anything that your OrderAction puts into the request will not be there after
the redirect. You can always setup another action to redirect to, that will
prepare items in the request before the eventual forward to /terms.jsp.

<action-mappings>
  <action path="/OrderSubmit"
    type="net.windward.store.OrderAction"
    name="orderForm"
    validate="true"
    input="/order.jsp">
    <forward name="success" path="/ShowTerms.do" redirect="true"/>
    <forward name="failure" path="/order.jsp"/>
  </action>
  <action path="/ShowTerms"
    type="net.windward.store.ShowTermsAction">
    <forward name="success" path="/terms.jsp"/>
  </action>
</action-mappings>

-Max

----- Original Message ----- 
From: "David Thielen" <[EMAIL PROTECTED]>
To: "Struts-Users" <[EMAIL PROTECTED]>
Sent: Tuesday, August 12, 2003 8:05 PM
Subject: action forward -> redirect


Hi;

I have action forwards in my action mapping as such:
<action-mappings>
  <action    path="/OrderSubmit"
    type="net.windward.store.OrderAction"
    name="orderForm"
    validate="true"
    input="/order.jsp">
   <forward name="success" path="/terms.jsp"/>
   <forward name="failure" path="/order.jsp"/>
  </action>
 </action-mappings>

So on a success it forwards to /terms.jsp. However, the browser url is still
OrderSubmit.do. This is what a forward is supposed to do.

But what if I want the browser to now show /terms.jsp? Is there some way to
do an action redirect without another jsp to have a redirect in it?

Also, for a multi-page form - do I want each page to have a different url in
the browser? Or just one that runs everything? Life is easier from a
programming point of view if each page has it's own action and form.

thanks - dave



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to