tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Loucks" <aar...@GardnerInc.com>
Subject RE: suppress directory listing
Date Thu, 04 Aug 2005 20:37:30 GMT
Override the default servlet in your application's web.xml:

<servlet>
  <servlet-name>default</servlet-name>
 
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-clas
s>
  <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
  </init-param>
  <init-param>
    <param-name>listings</param-name>
    <param-value>false</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
  <servlet-name>default</servlet-name>
  <url-pattern>/images</url-pattern>
</servlet-mapping>


Aaron Loucks
Web Developer
Gardner, Inc.
3641 Interchange Road 
Columbus, OH 43204 
614.456.3492
-----Original Message-----
From: Stephen Caine [mailto:stephen@commongrnd.com] 
Sent: Thursday, August 04, 2005 12:33 PM
To: Tomcat Users List
Subject: Re: suppress directory listing

Paul,

> My JSP app has a /images folder and Tomcat 5.5.9 happily serves up  
> a directory listing of this: how can I suppress this?

Just add a filed named, "index.html", to the directory.  You can put  
whatever you want in the file.  I often put, Access Prohibited" or  
some such thing.

Stephen Caine
Soft Breeze Systems, LLC

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message