cPr*_*rog 4 eclipse jsp tomcat http-status-code-404 welcome-file
在Tomcat服务器上运行Eclipse项目时出现以下错误:
HTTP状态404 - 请求的资源(/ ProjectName /)不可用.
浏览器地址栏中的URL是http://localhost:8080/ProjectName/.
我真的不知道我的文件中缺少什么.我Index.jsp在/WebContent文件夹中有一个我的web.xml包含在下面的条目:
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
Run Code Online (Sandbox Code Playgroud)
Bal*_*usC 11
默认情况下,当您打开项目根文件夹http://localhost:8080/ProjectName/而不是像中的物理文件一样时http://localhost:8080/ProjectName/Index.jsp,服务器将在中查找欢迎文件web.xml.如果没有找到,那么你将得到404"找不到页面"错误.
在您的情况下,URL和文件名区分大小写.你声明index.jsp是欢迎文件,但你提到你是一个Index.jsp.将其重命名为index.jsp,然后您将能够以这种方式使用欢迎文件打开webapp的上下文根.
| 归档时间: |
|
| 查看次数: |
73123 次 |
| 最近记录: |