HTTP状态404 - 请求的资源(/ ProjectName /)不可用 [英] HTTP Status 404 - The requested resource (/ProjectName/) is not available

查看:2053
本文介绍了HTTP状态404 - 请求的资源(/ ProjectName /)不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


HTTP状态404 - 请求的资源(/ ProjectName /)不可用。


浏览器地址栏中的URL为 http:// localhost:8080 /项目名/



我真的不知道我的文件丢失什么。我在 / WebContent 文件夹中的 Index.jsp 和我的 web.xml 包含以下条目:

 < welcome-file-list> 
< welcome-file> index.jsp< / welcome-file>
< / welcome-file-list>


解决方案

默认情况下,当您打开项目根文件夹在 http:// localhost:8080 / ProjectName / 中,而不是在 http:// localhost:8080 / ProjectName / Index.jsp中的物理文件,则服务器将在 web.xml 中查找欢迎文件。如果没有找到,那么你会得到这个404页面未找到错误。



在你的情况下,URL和文件名是区分大小写< STRONG>。您声明了 index.jsp 作为欢迎文件,但您提到您有一个 Index.jsp 。将其重命名为 index.jsp ,然后您可以使用欢迎文件打开webapp的上下文根目录。



另见:




I'm getting the following error when running my Eclipse project on Tomcat server:

HTTP Status 404 - The requested resource (/ProjectName/) is not available.

The URL in browser's address bar is http://localhost:8080/ProjectName/.

I really don't know what is missing in my files. I have an Index.jsp in the /WebContent folder and my web.xml contains below entry:

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

解决方案

By default, when you open the project root folder as in http://localhost:8080/ProjectName/ instead of a physical file as in http://localhost:8080/ProjectName/Index.jsp, then the server will lookup for a welcome file in web.xml. If none is found, then you'll get this 404 "Page not found" error.

In your case, URLs and file names are case sensitive. You declared index.jsp to be the welcome file, but you mentioned that you've an Index.jsp. Rename it to index.jsp and then you'll be able to open the webapp's context root with the welcome file this way.

See also:

这篇关于HTTP状态404 - 请求的资源(/ ProjectName /)不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆