struts2和free结合,struts2是用的annotation,问题是:之前的做法是在方法上面加@Result,注明根据什么样的返回值跳转到什么页面,比如:AdminAction中的login方法,返回“login”,现在的项目是没有写@Result,请问是怎么跳转的呢?谢谢!

解决方案 »

  1.   

    那意思是说现在的项目是用xml配置的呢?
      

  2.   

    struct xml 上配置 
    <action name="kpiSearchByAll" class="kpiSearchByAllAction">
    <result name="success" type="freeer">kpiSearchByAll.ftl</result>
    <result name="input" type="freeer">kpiSearchByAll.ftl</result>
    </action>
      

  3.   

    @risun88 
    我也是这样想的,但是现在的项目不是这样配置的,所以就问问还有没有其他的方式的;
      

  4.   

    那是如何配置的。是不是用了ajax了。
      

  5.   

    它是根据convention 的默认约定来找的, 我也是这几天才学的,LZ 学的话可以交流下
      

  6.   

    默认返回的是action名字_login.jsp