return new ActionForward("failure",
                                         "/pages/loadfailure.jsp", true)
其中failure,是不是要在某个地方接收?true表示重定向,什么时候需要重定向啊

解决方案 »

  1.   

    哦 谢谢   failure 这个名字 有什么用呢 
    是不是可以随便写啊 
      

  2.   

    还有就是 ActionForward 和forward(mappint,"success")有什么区别啊
      

  3.   

    ActionForward类提供了下面五种构造器: public ActionForward() public ActionForward(String path) public ActionForward(String path, boolean redirect) public ActionForward(String name, String path, boolean redirect) public ActionForward(String name, String path, boolean redirect, boolean contextRelative) 虽然这些构造器是不需要说明的,但我们应该注意下面几点。在这些构造器中,第二种可能是最常用的。后四种构造器中的path参数表示的是到目的资源的路径。后三种构造器中的redirect布尔值表示的是是否执行了一个重定向(redirect)。(缺省情况下,这个值设置为false,因为redirect比forward慢。)最后,第五个构造器中的contextRelative布尔值表示该路径是否应该是context-relative的,而不是module-relative的。