把http://localhost:8080/servlet/HelloWorldExample
改成http://localhost:8080/servlets-examples/HelloWorldExample

解决方案 »

  1.   

    改成http://localhost:8080/servlets-examples/HelloWorldExample
    也是一样显示不了,报错信息一样。谢谢,还有别的可能存在的错误吗?
      

  2.   

    http://localhost:8080/servlets-examples/HelloWorld.jsp就能显示
    而要显示系统自带的HelloWorldExample.calss,改成
    http://localhost:8080/servlets-examples/HelloWorldExample还是显示不了,(注:可以把HelloWorldExample.java成功编译成HelloWorldExample.calss)
    是不是还要设置系统变量什么的呢?
      

  3.   

    是啊,就是Tomcat 5.5装的时候自带的,没动过。
      

  4.   

    你这是一个servlet吧!
    运行servlet需要在web.xml做些配置的.
    在网上找篇文档看看吧!
      

  5.   

    查看web.xml文件的<servlet-mapping></servlet-mapping>标签中的内容,比如HelloWorldExample这个例子,在web.xml中的引用是<serblet-mapping> <servlet-name>HelloWorldExample</servlet-name>
            <url-pattern>/servlets/servlet/HelloWorldExample</url-pattern></servlet-mapping>那么在浏览器中就应该输入http://localhost:8080/examples/servlets/servlet/HelloWorldExample,这样一定可以运行,总结上述,一般出现HTTP   Status   404   -   /examples/WEB-INF/classes/HelloWorldExample   
      description   The   requested   resource   (/examples/WEB-INF/classes/HelloWorldExample)   is   not   available   
    这种错误提示,基本上都是文件的url路径不对,这时候按照上述方法查看路径后再输入,相信基本上可以解决!