<global-results>

              <result name="error">/Error.jsp</result>   <!--   Action.ERROR -->

    <result name="invalid.token">/Error.jsp</result>

    <result name="login" type="redirectAction">Logon!input</result>

  </global-results>

 

 有很多时候一个<result>可供很多<action>使用,这时可以使用<global-results>标签来定义全局的<result>。

      执行顺序:当一个Action返回的String没有相应的<result>与之对应,Struts2就会查找全局的<result>。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
  • 2021-04-10
  • 2022-02-09
  • 2022-12-23
  • 2021-10-14
猜你喜欢
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-01-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案