wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Disable dir listing in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Disable dir listing in tomcat" Watch "Disable dir listing in tomcat" New topic
Author

Disable dir listing in tomcat

Brian Daniel
Greenhorn

Joined: Oct 30, 2001
Posts: 11
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

Joined: Oct 30, 2001
Posts: 11
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable dir listing in tomcat
 
Similar Threads
web.xml url-pattern wildcards?
Virtual Host Configuration in Tomcat 4.01
where is my webapp?
Non-absolute anchor href to web app's root
UnpackWAR