简体   繁体   English

在Eclipse 3.7中使用Tomcat 7运行Hello World Servlet时出现HTTP 404错误

[英]HTTP 404 Error when running a Hello World servlet with Tomcat 7 in Eclipse 3.7

I followed the steps in this tutorial to create a Hello World servlet in a new dynamic web project in eclipse. 我按照本教程中的步骤在eclipse中的新动态Web项目中创建Hello World servlet。 But when I got to the section marked "5. Run Your Servlet Code", the application failed to run (I got a 404 error message in the browser). 但是,当我到达标记为“ 5.运行您的Servlet代码”的部分时,该应用程序无法运行(在浏览器中收到404错误消息)。 Any suggestions? 有什么建议么?

If the server says ClassNotFoundException, it means the Class is Not Found Exception :-) 如果服务器显示ClassNotFoundException,则表示该类未找到异常:-)

Did you check your deploy and work directories inside tomcat? 您是否在tomcat中检查了部署目录和工作目录? verify you really have the class inside your war (or uncompressed in the work dir) 验证您是否确实在战争中拥有该类(或在工作目录中未压缩)

If not: put them manually to check your code works; 如果不是,请手动将其放入以检查您的代码是否有效; then check why your eclipse or netb doesn't copy them to the server deployement dir 然后检查为什么eclipse或netb不会将它们复制到服务器部署目录

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

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