我在action里面写了一个验证登录错误时返回主页面的语句。return (new ActionForward(mapping.getInclude()));
为什么每次都出错?  我执行System.out.println(mapping.getInclude())的时候显示为空,为什么呢?

解决方案 »

  1.   

    debug一下 看空的源头是哪
      

  2.   

    你那个方法没用过!
    如果是获得输入的页面的话  
    记得用Mapping.getInput()
      

  3.   

    你的 mapping 是null吗?
      

  4.   

    错了是 
    mapping.getInputForward()试试看
      

  5.   

    一般都用这两个方法:
    mapping.getInputForward();
    mapping.findForward("success");
      

  6.   

    你们说的方法都可以,不过书上写的是mapping.getInclude  不知道为什么不能运行