其他分享
首页 > 其他分享> > 让 Tomcat 在页面列出 Web 应用的目录

让 Tomcat 在页面列出 Web 应用的目录

作者:互联网

打开conf/web.xml文件,找到<param-name>listings</param-name> <param-value>false</param-value>,修改为<param-name>listings</param-name> <param-value></param-value>

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                      http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
  version="3.1">

    <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>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    ...
</web-app>

标签:xml,Web,catalina,false,Tomcat,listings,conf,页面
来源: https://www.cnblogs.com/matroleox/p/15876944.html