Hi all,
The default setting for directory listing is false in tomcat's
web.xml(which is good idea anyway), some applications require
directory listings
though.
Trying to follow a configuration posted earlier, I found that to be 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.
This is the applications excerpt of the mapping:
<servlet>
<servlet-name>MyListing</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MyListing</servlet-name>
<url-pattern>/myappdir/</url-pattern>
</servlet-mapping>
I see that the servlet MyListing is actually used and processing the
request, but directory listing is still forbidden (with 404), as if the
init-param "listings" would simply be ignored.
Any comments on why this config does not work as expected or other possible
approaches would be higly appreciated.
BR
--
Roland Lammel
"Enjoy your job, make lots of money, work within the law. Choose any two."