【发布时间】:2015-01-15 03:25:04
【问题描述】:
这是我第一次尝试自行设置 Web 应用程序项目,但由于某种原因,我什至无法让它与 hello world 设置一起使用。我将所有内容都设置为默认值,选择用于编译的 JDK1.8 和一个带有 index.html 页面的 Tomcat7 服务器,其中只有文本。将项目添加到服务器后,我应该能够右键单击项目并在服务器上运行,但即使使用这个简单的设置,我仍然会收到 404。我错过了什么?
Web.xml 欢迎列表:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
【问题讨论】:
-
您访问的是哪个网址?
-
localhost:8080/[Project Name],当你运行时 Eclipse 会自动命中它。在服务器上运行。
-
提供项目结构的详细信息。
标签: java eclipse http-status-code-404 tomcat7