日期:2014-05-17 浏览次数:20605 次
<package name="public" extends="struts-default">
<action name="login" class="...">
<!-- Redirect to another namespace -->
<result type="redirect-action">
<param name="actionName">dashboard</param>
<param name="namespace">/secure</param>
</result>
</action>
</package>
<package name="secure" extends="struts-default" namespace="/secure">
<-- Redirect to an action in the same namespace -->
<action name="dashboard" class="...">
<result>dashboard.jsp</result>
<result name="error" type="redirect-action>error</result>
</action>
<action name="error" class="...">
<result>error.jsp</result>
</action>
</package>
<package name="passingRequestParameters" extends="struts-default" namespace="/passingRequestParameters">
<-- Pass parameters (reportType, width and height) -->
<!--
The redirect-action url generated will be :
/genReport/generateReport.action?reportType=pie&width=100&height=100
-->
<action name="gatherReportInfo" class="...">
<result name="showReportResult" type="redirect-action">
<param name="actionName">generateReport</param>
<param name="namespace">/genReport</param>
<param name="reportType">pie</param>
<param name="width">100</param>
<param name="height">100</param>
</result>
</action>
</package>