简体   繁体   English

简单的Hello World Servlet在Eclipse Tomcat中给出错误404

[英]Simple Hello World servlet giving error 404 in Eclipse Tomcat

I am trying to follow a very simple Hello World servlet tutorial from this link . 我试图通过此链接遵循一个非常简单的Hello World servlet教程。 I have followed all steps as written, but when I run it on the tomcat7 server (downloaded from within eclipse), it gives me an HTTP error 404, saying that the requested source is not available. 我已经按照编写的所有步骤进行操作,但是当我在tomcat7服务器(从eclipse中下载)上运行它时,它给了我一个HTTP错误404,表示请求的源不可用。

Note that my server is working fine on 请注意,我的服务器在

localhost:8080 本地主机:8080

. But the servlet - 但是servlet-

localhost:8080/HelloWorldServlet/HelloWorld 本地主机:8080 / HelloWorldServlet / HelloWorld

is giving me this error. 给我这个错误。

It means Tomcat cannot map your url to existing servlet method. 这意味着Tomcat无法将您的URL映射到现有的servlet方法。 Are you sure, you covered all steps correctly? 您确定您正确地涵盖了所有步骤吗? Hard to say with no details included. 很难说,没有细节。

网址后可能缺少应用程序名称,如果将其上传到gitHub,也许我可以提供更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM