使用 Tomcat 的 Eclipse 中的 HTTP 状态 404 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10089321/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 18:00:28  来源:igfitidea点击:

HTTP Status 404 error in Eclipse using Tomcat

javaeclipsejsptomcatservlets

提问by TU_HEO DAKAI

When i tried to create a small demo in Eclipse with Tomcat (Tomcat 7.0.27, Eclipse Europa and Java 1.6.0_32 ) , i got this error when lauching the page :

当我尝试使用 Tomcat(Tomcat 7.0.27、Eclipse Europa 和 Java 1.6.0_32)在 Eclipse 中创建一个小演示时,我在启动页面时遇到此错误:

HTTP Status 404 - /Demo/
type Status report
message /Demo/
description The requested resource (/Demo/) is not available.
Apache Tomcat/7.0.27

I recorded the screen, please have a look at this video (try playing in HD): http://www.screenr.com/L5d8

我录了屏,请看这个视频(尝试高清播放):http: //www.screenr.com/L5d8

Where am I wrong?

我哪里错了?

回答by Jigar Joshi

You created index page inside WEB-INFthat is not public web area, your user can't access it directly,

您在WEB-INF非公共网页区域内创建了索引页面,您的用户无法直接访问它,

Pull out the index page in webcontent (parallel to WEB-INF)

拉出webcontent中的索引页(与WEB-INF并行)