只需要在struts.xml中对应的<result>中设置type="redirectAction">
<result name="answerQue" type="redirectAction">Question!answer</result>
当某个Action返回字符串为"answerQue"时,直接调用Question的answer方法。
还有其他形式的写法可以参考struts2中关于struts.xml的说明文档
只需要在struts.xml中对应的<result>中设置type="redirectAction">
<result name="answerQue" type="redirectAction">Question!answer</result>
当某个Action返回字符串为"answerQue"时,直接调用Question的answer方法。
还有其他形式的写法可以参考struts2中关于struts.xml的说明文档