我在request中有一个参数this.request.setAttribute("APercentValue", this.strAPERCENT);
strAPERCENT="1.11";  执行到javax.servlet.RequestDispatcher.forward(request, response);这句的时候就会出错  错误内容是org.apache.jasper.JasperException: For input string: "1.11"但是如果是整数就没有问题,请教是为什么呢?

解决方案 »

  1.   

    看看你的代码中是否有 string --> Number 或者 字符串format
      

  2.   

    private String strAPERCENT = "1.11";
    protected void doPost(HttpServletRequest _request, HttpServletResponse _response) throws ServletException, IOException {
    try {
    this.request.setAttribute("APercentValue", this.strAPERCENT);
    RequestDispatcher myRequestDispatcher = null;
    myRequestDispatcher = getServletContext().getRequestDispatcher("/JSP/AGENT/" + strPageName);
    myRequestDispatcher.forward(request, response);
    }基本是这样的  到了FORWARD就会出错
      

  3.   

    代码中没有转类型的  从数据库取出来之后就一直以String 型进行操作的
      

  4.   

    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException { String strAPERCENT = "1.11"; request.setAttribute("APercentValue", strAPERCENT);
    RequestDispatcher myRequestDispatcher = null;
    myRequestDispatcher = getServletContext().getRequestDispatcher(
    "/index.html");
    myRequestDispatcher.forward(request, response);上面的代码在我的机器上能够正常执行。把错误栈堆贴上来看看。
      

  5.   

    找到原因了  不是FORWARD的问题  谢谢啦~~