tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Application specific directory listings not working as expected
Date Mon, 08 Jan 2007 19:08:12 GMT
> From: roland.lammel@gmail.com 
> Subject: Application specific directory listings not working 
> as expected
> 
> The idea is the configure a "application specific" default 
> servlet (simply copy from tomcat's web.xml), change the
> servlet name and add a servlet mapping for the specific
> directory to be allowed for listing.

I think the problem with the above is that the DefaultServlet does not
include the <url-pattern> when retrieving static resources, including
directory listings.  Consequently, the desired directory is never
actually found, resulting in the 404 status.

>  <servlet-mapping>
>    <servlet-name>MyListing</servlet-name>
>    <url-pattern>/myappdir/</url-pattern>
>  </servlet-mapping>

Try changing the <url-pattern> above to just a single slash; this should
get you the listings you need, although it does open up all of the
directories of your app that don't have welcome files and aren't under
WEB-INF.  If you really want to give listing access to only a select set
of directories, you may have to place them in a separate webapp.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message