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:[EMAIL PROTECTED] 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to