Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Turning off directory browsing

 
Reuben Cleetus
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does one turn off directory browsing on Tomcat 4.0.2?
Regards,
Reuben Cleetus
/*
Reuben Cleetus
web: http://rcleetus.dhs.org
*/
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go into web.xml in the tomcat/conf directory.
<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>
Change:
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
to
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic