I have an action with two dispatch methods. I have a single JSP that renders a list and also have an import file field. On import failure, I want to populate the list with an error message.
THE PROBLEM: It looks like validation for the list() method is wiping the errors from the import() method. Example struts.xml: <action name="*Role" class="RoleAction" method="list"> <result name="input">/list.page</result> <result name="success">/list.page</result> </action> <action name="importRole" class="RoleAction" method="import"> <result name="input" type="chain">listRole</result> <result name="success" type="chain">listRole</result> </action> Example pseudo code: public String list() { // sql lookup, populate list return "success"; } public String import() { // do import If (fail) { addActionError(errorMessage); } return "success"; }