如何禁止列出站点文件目录

设置conf/web.xml配置文件,作如下修改

xml 代码
  1. <servlet>  
  2. <servlet-name>default</servlet-name>  
  3. <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>  
  4. <init-param>  
  5. <param-name>debug</param-name>  
  6. <param-value>0</param-value>  
  7. </init-param>  
  8. <init-param>  
  9. <param-name>listings</param-name>  
  10. <param-value>true</param-value>  
  11. </init-param>  
  12. <load-on-startup>1</load-on-startup>  
  13. </servlet>  

把listening值改为false

你可能感兴趣的:(apache,xml,Web,servlet)