double  getDAmount = 0.0;
        getDAmount = SETMinAmount.creategetMinAmount(out,lCurrencyIDAbstract,strPayerAcctNo,dAmount);
   
        request.setAttribute("getDAmount");这样取为什么会报错

解决方案 »

  1.   

    setAttribute方法签名是这样的:
    setAttribute(java.lang.String name, java.lang.Object o)
    这需要两个参数,你只给一个,当然报错!
      

  2.   

    setAttribute是设值,getAttribute(java.lang.String name)是获取值。request.setAttribute的范围也只是前后两个页面
      

  3.   

    request.setAttribute(String name, Object value)是在属性列表中添加/删除指定的属性 
      

  4.   

    你是要取还是放呢
    取值:getAttribute("key","value");
    放值:setAttribute("key","value");
      

  5.   

    修改如下:
    double getDAmount = 0.0;
      getDAmount = SETMinAmount.creategetMinAmount(out,lCurrencyIDAbstract,strPayerAcctNo,dAmount);
        
      request.setAttribute("getDAmount", getDAmount);
    取的时候:
    double getDAmount = (double)request.getAttribute("getDAmount");