tomcat显示目录文件列表

来源:互联网 发布:邪恶镰刀 数据 编辑:程序博客网 时间:2024/05/12 11:43

Firest:

 <servlet>

        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>

    </servlet>


web.xml中如上配置段,将listings值改为true

Second:

 <!--
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    -->

web.xml中如上配置取消 <welcome-file-list>


搞定吐舌头







0 0
原创粉丝点击