提交页面 String aaaa=request.getParameter("aaa");   如果上一页没有aaa这个参数 这句话会报错,应该得null值 才对啊别的工程就不会报错 怎么回事?

解决方案 »

  1.   

    你是不是对aaaa又进行了别的操作啊 
      

  2.   

    应该不是这行报的错,是你在后面对aaaa做操作时报的错。
      

  3.   

    你位置放的不对..........可能在页面加载前就执行了 但没aaa这参数
      

  4.   

    java.lang.NullPointerException
    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:441)下面没用到这个数呢还
    调试到这就出错了
      

  5.   

    同意,如果前面都正常,request为null的可能性比较大
      

  6.   

    应该不是这一行的错误,如果你这个参数是通过ActionForm来传递,看看是不是在ACTION中对AAA进行获取.
      

  7.   

    6楼说的对 request是null的 public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request,
    HttpServletResponse response) throws Exception {
    HrConfigurationForm theForm = (HrConfigurationForm) form;
    if (StringUtils.isBlank(theForm.getBean().getCode())) {
    theForm.setBean(service().newInstance(theForm.getParentCode()));
    }
    return mapping.findForward(theForm.getStep());
    }action 这里取能取到,,
    form里
    public HrConfiguration getBean() {
    String aaa=request.gerequest就是null的
    return bean;
    }
    我这方法里 我的request就变null了