...
The more elegant solution is probably by using multiple mappings for same Action. This way you don't need to set "struts.enable.DynamicMethodInvocation" to "true".
In JSP
Code Block | ||||
---|---|---|---|---|
| ||||
<s:form method="post" action="mySubmitAction"> <s:submit value="Submit"/> <s:submit value="Clear" action="myClearAction"/> </form> |
...
Code Block | ||
---|---|---|
| ||
public class MyClearAction extends MyAction { public String execute() throws Exception { // clear button logic here return SUCCESS; } } |
Credit: Andrea Ligios