Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable dir listing in tomcat

 
Brian Daniel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I point a browser at the root of my webapp
http://host/mywebapp/
I get a directory listing. Also works for all subdirs. How do I disable this?
 
Brian Daniel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
N/m, finally found it myself. In tomcat 4.0+ in $CATALINA_HOME/conf/web.xml, change the listings parameter in the default servlet declaration to false.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic