一个变量只能是一种数据类型,不像ASP 对数据类型不敏感
你这条语句currpage=Integer.parseInt(currpage);
使用的currpage 定义的是何种类型
使用两个变量,就可以解决

解决方案 »

  1.   

    String currpage;
    currpage=request.getParameter("page");
    if (currpage==null)
    {
    currpage="1";
    }
    currpage=Integer.parseInt(currpage);
      

  2.   

    Integer.parseInt()方法返回的是一个整型数,在JAVA中不能直接把它付给字符串。
      

  3.   

    mu_x说的对,你用parseInt返回的是一个integer,你要么再定义一个integer型的变量,要么做个转换。但是,如果你的currpage要取得的值是有什么意义了。
      

  4.   

    把currpage的数据类型转换一下吧!