【问题标题】:Index.html returning 404 in tomcat when accessed directly直接访问时tomcat中的index.html返回404
【发布时间】:2014-01-14 13:27:19
【问题描述】:

我安装了tomcat。根文件夹是 /var/lib/tomcat7/webapps/ROOT ,其中有一个 index.html 文件。该文件可以作为 server-ip:8080 访问。但是 server-ip:8080/index.html 返回 404 。为什么会这样?

【问题讨论】:

  • 根文件夹中肯定是index.html,而不是index.jsp
  • 是 index.html 好吧

标签: tomcat tomcat7


【解决方案1】:

有可能当您的服务器从您的 web.xml 的欢迎文件列表中提供服务时(通常指定为这样的内容:)

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

与您尝试直接导航到它时相比,它具有不同的权限。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-03
    • 2021-11-06
    • 1970-01-01
    • 2021-08-05
    • 1970-01-01
    • 1970-01-01
    • 2023-01-14
    相关资源
    最近更新 更多