and yet another way :) you can place an index.html file in your resource directories, and that will load instead of a directory listing.
Jeff Painter On Tue, 11 May 2004, David Demner wrote: > Hi Peter, > > There are a couple of ways to do this: > > --------------- > In Tomcat's web.xml there is a listings entry, which you can set to false. > This will disable all directory listings for all webapps. > > <init-param> > <param-name>listings</param-name> > <param-value>false</param-value> > </init-param> > -------------- > In the application's web.xml you can specify a security-constraint item: > > <security-constraint> > <web-resource-collection> > <web-resource-name>templates</web-resource-name> > <url-pattern>/templates/*</url-pattern> > </web-resource-collection> > <web-resource-collection> > <web-resource-name>logs</web-resource-name> > <url-pattern>/logs/*</url-pattern> > </web-resource-collection> > <web-resource-collection> > <web-resource-name>resources</web-resource-name> > <url-pattern>/resources/*</url-pattern> > </web-resource-collection> > <auth-constraint> > <role-name>admin</role-name> > </auth-constraint> > </security-constraint> > > Which will then prompt for a username and password (defined in > tomcat-users.xml) when someone tries to access the directory listing. Only > after the user is authenticated will it show the directory listing. > -------------- > > David --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
