<!-- 生成验证码 -->
<action name="rand" class="mainAction" method="rand">
<result type="stream"> //默认返回为name=SUCCESS
<param name="contentType">image/jpeg</param>
<param name="inputName">inputStream</param>
</result>
</action>
<action name="addRight" class="rightAction" method="addRight"> //一个action实现类有多个action
<result type="redirectAction"> //默认返回为name=SUCCESS,跳转的action在同一个类中
<param name="actionName">viewRight</param> //跳转到另一个ACTION.
<param name="rightid">${rightid}</param> //参数传给了ACTION(rightAction)类的全局变量rightid
</result>
<result name="input">/roleright/addRight.jsp</result> //jsp的第一个斜杠表示WebRoot目录
</action>
<action name="configUpload" class="mainAction" method="configUpload">
<result type="redirectAction">toConfig</result>
</action>
本文转自农夫山泉别墅博客园博客,原文链接:http://www.cnblogs.com/yaowen/archive/2013/02/27/2935644.html,如需转载请自行联系原作者