这个错误没有了,可是到后面:
String cont=counter.ReadFile("/counter.txt");
 counter.WriteFile("/counter.txt",cont);
时,它告诉我说:
The requested resource (counter.txt (系统找不到指定的文件。)) is not available这又是怎么回事啊???

解决方案 »

  1.   

    干吗写进文件,直接用数据库了,数据库操作写在另外一个类里面另外,一般bean要打包,先要import ,再<jsp:useBean id="xx" class="xx" scope="xx"/>
    再<jsp:setProperty name="xx">,再<jsp:getProperty name="xx">name ,id 要相同
      

  2.   

    好了,后面
    The requested resource (counter.txt (系统找不到指定的文件。)) is not available
    是因为它认为文件counter.txt放在tomcat/bin/里面,它的默认的搜索路径是/bin/,改改就OK了,用数据有点麻烦,呵呵