Has anyone ever noticed the "Set" methods in the ActionForm invoked multiple times (always using the values submitted from the html:form) from Action to Action?
In our JSP, we have several buttons pertaining to the same form ("thisActionForm"). Depending on which button was pressed, a different action mapping is invoked from Struts: <action path="/handleButtons" type="HandleButtonsAction" name="thisActionForm" validate="false" scope="session" input="/home.jsp"> <forward name="updateDetailsButton" path="/updateDetails.do"/> <forward name="resetDetailsButton" path="/resetDetails.do"/> <forward name="calculateButton" path="/calculateAmounts.do"/> <forward name="deleteButton" path="/deleteDetails.do"/> </action> <action path="/resetDetails" type="ResetDetailsAction" name="thisActionForm " validate="false" scope="session" input="/home.jsp"> <forward name="success" path="/calculateAmounts.do"/> </action> <action path="/calculateAmounts" type="CalculateAmountsAction" name="thisActionForm " validate="false" scope="session" input="/home.jsp"> <forward name="success" path="/details.jsp"/> </action> We see the fields entered/changed in "thisActionForm" set before entering the "HandleButtonsAction" class. We also see the same field values set again before entering the "ResetDetailsAction" class, as if the HTML form has been submitted a second time. The "ResetDetailsAction" resets some date fields on "thisActionForm", by invoking various Set methods. We then see the original field values set a third time before entering the "CalculateAmountsAction" class, clearing out the values reset in the "ResetDetailsAction" As anyone seen anything similar? Is there an attribute we could use in the action element that would disallow the form from submitting again and again and again? Our current work around is to not use "thisActionForm" on any other actions, except the "HandleButtonsAction", and just grab "thisActionForm" off of the session in "ResetDetailsAction" and "CalculateAmountsAction", but we feel that there's an easier way. Sorry for the novel... -dave kearfott