File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Turning off directory browsing 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 "Turning off directory browsing" Watch "Turning off directory browsing" New topic
Author

Turning off directory browsing

Reuben Cleetus
Ranch Hand

Joined: Jul 13, 2001
Posts: 50
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

Joined: May 05, 2000
Posts: 13974
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>


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Turning off directory browsing
 
Similar Threads
Pointer (JDK 1.4) true or false ?
java
Any news about JavaServer Faces?
GUI Designer for Eclipse
stopping the application from displaying index.jsp