1、<form action="submit.action" >
<s:textfield name="msg" label="输入内容"/> <s:submit name="sub1" value="提1" align="left" method="method1"/> <s:submit name="sub2" value="提2" align="left" method="method2"/> </form>
2、在action中写对应的方法:
public String method1() throws Exception
{
return "method1";
}
public String method2() throws Exception
{
return "method2"
}
3、在strut.xml中:
<action name="submit" class="action.XX">
<result name="method1" >
/result.jsp
</result>
<result name="method2">
/result.jsp
</result>
</action>