struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Markert <>
Subject Re: Problem handling error forwards
Date Tue, 03 Feb 2004 09:48:10 GMT
Hello Lukas,


LÖ> Hello

LÖ> For some time now I have had a problem when dealing with
LÖ> errors and the resulting different forwards:

LÖ> When action3 generates an error (for instance in the form validator) and forwards
LÖ> to action2 to deal with it (display it) but this action2 deals with errors and forwards
LÖ> to action1 then the jsp for action1 is displayed, but not the jsp for action2.

LÖ> (Those three actions are a process sequence, action1 prepares a page
LÖ> to enter some data, action2 (and form2) check that data and allow entering
LÖ> additional data and send it to action3 where the data is saved.)

LÖ> Why is this?

LÖ> Here the actions for details:

LÖ>     <!-- specify the directory from which to imort sound files -->
LÖ>     <action   path="/specifysounddirectory"
LÖ> type="net.morkeleb.yarf.action.SpecifySoundDirectoryAction"
LÖ>               name="addTracksForm"
LÖ>               scope="request"
LÖ>               validate="false"
LÖ>               input=".specifysounddir">
LÖ>       <forward name="success"              path=".specifysounddir"/>
LÖ>       <forward name="failure"              path=".specifysounddir"/>
LÖ>     </action>

LÖ>     <!-- display which files are available in the selected directory
LÖ>           and allow to select which to import -->    
LÖ>     <action   path="/listaddtracks"
LÖ>               type="net.morkeleb.yarf.action.ListAddTracksAction"
LÖ>               name="addTracksForm"
LÖ>               scope="request"
LÖ>               validate="true"
LÖ>               input=".specifysounddir">
LÖ>       <forward name="success"              path=".listaddtracks"/>
LÖ>       <forward name="failure"              path=".specifysounddir"/>
LÖ>     </action>

LÖ>     <!-- import selected files -->
LÖ>     <action   path="/addtracks"
LÖ>               type="net.morkeleb.yarf.action.AddTracksAction"
LÖ>               name="addTracksForm"
LÖ>               scope="request"
LÖ>               validate="true"
LÖ>               input="/">
LÖ>       <forward name="success"              path="/"/>
LÖ>       <forward name="failure"              path="/"/>
LÖ>     </action>
LÖ>   </action-mappings>

LÖ> As you see action3 (addtracks) forwards to /
LÖ> (it has to be the action because data the avaiable tracks
LÖ> have to be prepared for display). If it would forward to the
LÖ> .listaddtracks tile the error would be correctly displayed
LÖ> in action2 but the avaiable tracks would not be prepared.

LÖ> As addtracks forwards to listaddtracks with an error
LÖ> (only when it occours ofcourse) listaddtracks somehow
LÖ> recognizes that existing error and thinks: we have an
It's not the action recognizing the error but your addtrackForm.
Validate is called on forwarding to your action2.
LÖ> error, so I have to forward to .specifysounddir to
LÖ> display it.

LÖ> Can you help me on this?

LÖ> Regards,
LÖ> Lukas Österreicher

LÖ> ---------------------------------------------------------------------
LÖ> To unsubscribe, e-mail:
LÖ> For additional commands, e-mail:


+------- Quality leads ---------------------------------------+
| Dirk Markert            |
| Dr. Markert Softwaretechnik AG                              |
| Joseph-von-Fraunhofer-Str. 20                               |
| 44227 Dortmund                                              |
+---------------------------------->>>>>>> to success! <<<<<<-+

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message