In that case, when action mapping looks like this
(as you wrote in your mail before):

<action path="/MyAction"
      input="/path/file.jsp" ...>
      <forward name="ok" path="/path/file.jsp"/>
</action>

then you have to do the following at the end of your
action (after all work has been done):

return mapping.findForward( "ok" );

where the "ok" has to be the same in the method and in
forward name parameter. Struts searches the forwards
taht you define in your mapping, and returns an
ActionForward (you dont need to care about this,
it is all done for you). If you would like your action to
forward to another place (that can be another jsp, or
Action, for example if an error occurs), you would do
the following:

<action path="/MyAction"
      input="/path/file.jsp" ...>
      <forward name="ok" path="/path/file.jsp"/>
      <forward name ="notok" path="/path/error.jsp"/>
</action>

and in your action

if( no errors )
    return mapping.findForward( "ok" );
else
    return mapping.findForward( "notok" );

Greetings

Peter


---------------------------------------------------------------------
-----Ursprüngliche Nachricht-----
Von: Andrzej Bengner [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 12. Dezember 2005 10:37
An: Struts Users Mailing List
Betreff: Re: Action forward path


> The parameter attribute defines the target of your
> forward action, that is your jsp.

Thanks.
And what if I want to execute my action (do something) and forward to 
this path (/path/file.jsp or /path/MyAction.do)?


Regards

-- 
Andy

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

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

Reply via email to