chain是个拦截器 详细见http://www.songsongblog.cn/?p=9
redirect 重定向到另外的action

解决方案 »

  1.   

    redirect 重定向
    chain 继续请求到其他的action,就好像好几个过滤器一起用一样。
    不写就是默认  重定向。
      

  2.   

    <package name="post" namespace="/post" extends="struts-default">
            <action name="savePost" method="savePost" class="net.mengfanpp.bbs.post.web.action.PostAction" >            
                <result type="redirect-action">viewPost?postid=${postid}</result>
                <result name="input">/WEB-INF/pages/post/edit.jsp</result>           
            </action>             
            <action name="viewPost" class="net.mengfanpp.bbs.post.web.action.PostAction" method="viewPost">
                <result>/WEB-INF/pages/post/view.jsp</result>
            </action>
        </package>action间 跳转 传递参数的简单代码
      

  3.   

    type默认值是dispatcher
    Chain Result
    用来处理Action链Dispatcher Result
    用来转向页面,通常处理JSP