你在浏览器输入http://localhost/test.htm,看有没有页面相应就知道了...

解决方案 »

  1.   

    不用写端口号吗?一般情况只要你输入http://localhost:8080/test.htm 如果文件不存在它会出错 告诉你文件不存在 你也可以去相应目录自己查看
      

  2.   

    不好意思!
    我在java 版问,以为大家知道。我的意思是使用java 如何判断 http://localhost/test.htm是否存在
      

  3.   

    URL ss = new URL("http://localhost/test.html");
    ss.openStream();如果不存在,会抛出FileNotFoundException异常。