1. 程式人生 > >tomcat顯示目錄檔案列表

tomcat顯示目錄檔案列表

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>

搞定吐舌頭