> -----Original Message----- > From: Kristj�n R�narsson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 05, 2002 7:04 AM > To: Tomcat Users List > Subject: Overview of the various approaches to supressing directory > contents listings in tomcat standalone > > > I know this has been asked before but please bear with me. > > I would like to go through the various methods to supress directory > listings with Tomcat 4.0.x standalone. Below is a list of stupid > quiestions. Could somebody please elaborate on how these > things are done? > > 1) I have been told that it is possible to do this in server.xml. > 2) Supposedly it is posseble to supress the listing for a single sub > directory of the webapps directory but not others using web.xml. How? > 3) Supressing certain items in the directory listing but not others. >
Not sure about #1 (don't think so) or #3 (probably some way to do it but I don't know), but for #2: Change the <servlet> directive to this: <servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> <init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> HTH, and HIR Erik -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
