现在的位置: 首页 > 综合 > 正文

struts.xml配置

2012年08月24日 ⁄ 综合 ⁄ 共 443字 ⁄ 字号 评论关闭

调用jsp页面和Action的XML的写法

    <package name="packagename" extends="struts-default">
        
<action name="actionname" method="methodname"  class="classpath">
            
<result name="ERROR">/error.jsp</result>
            
<result type="redirect-action">gotoaction</result>
        
</action>
    
</package>

<result name="ERROR">/error.jsp</result>表示返回ERROR时,调用error.jsp页面

<result type="redirect-action">gotoaction</result>表示返回SUCCESS时,调用gotoaction这个Action

抱歉!评论已关闭.