【问题标题】:Tomcat without index.html show files in directory [closed]没有index.html的Tomcat在目录中显示文件[关闭]
【发布时间】:2012-06-10 02:18:54
【问题描述】:

我想知道当 index.html 不在根目录中时,如何让 tomcat 显示目录中的文件?目前它给了我一个错误页面。

description The requested resource 
(/Tutorials/ios/exercise-files/Ex_Files_iOS4_Web_Apps/Ch02/) is not available.

【问题讨论】:

    标签: apache tomcat configuration local


    【解决方案1】:

    打开 Tomcat 自己的 /conf/web.xml 文件(如果您使用 Eclipse,则打开 Servers 项目中的那个),找到 DefaultServlet<servlet> 条目并更改 listings 初始化参数从falsetrue

    <init-param>
        <param-name>listings</param-name>
        <param-value>true</param-value>
    </init-param>
    

    另见:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-06-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-17
      • 2020-12-25
      • 1970-01-01
      相关资源
      最近更新 更多