Currently the perform() method in the Action object takes ActionMapping as
one of the parameters & returns the ActionForward instance corresponding
to an evaluated result.
Instead, we could let the perform(...) method return a String which is the
result value. The ActionServlet can then determine what to do based upon
the outcome of the method. The struts-config.xml file could change like
this.
<action path="/editSubscription"
type="org.apache...."
name="subscriptionForm"
scope=".."
validate="..."
<On Outcome="Success">
<forward path="/mainMenu.jsp"/>
</On>
<On Outcome="Failure">
<!-- NEW RECOMMENDED WAY OF SPECIFYING STEPS, this will reuse of
information. Instead of hard coding loginVU.jsp, reference
another element which describes what is LoginVU
Similarly for actions
-->
<WebflowStep Name="LoginTriesWS"/>
<DisplayView Name="LoginVU"/>
</On>
<On Outcome="TriesExcedded">
<DisplayView Name="LoginTriesVU"/>
</On>
</action>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/