1、編寫一個類雏婶,實現(xiàn)com.opensymphony.xwork2.Result接口。
2、聲明自定義的結果類型:先聲明后使用
<struts>
<constant name="struts.devMode" value="true"></constant>
<package name="pp" extends="struts-default">
<result-types><!--聲明-->
<result-type name="ss" class="com.xxx.xxx"></result-type>
</result-types>
</package>
</struts>
3.使用
<action name="cc" class="com.hw.action.Hello" method="say">
<result name="hah" type="ss">/Page.jsp</result><!--引用-->
</action>