DefaultServlet docu 6.0 says about attibute readmeFile: If a directory listing is presented, a readme file *may* also be presented with the listing. This file is inserted ..... This was true for 5.5.x. 6.0.14 crashes if the file is absent in the listed directory. javax.servlet.ServletException: Error opening readme resource at org.apache.catalina.servlets.DefaultServlet.getReadme(DefaultServlet.java:1418) This new behaviour blocks the listing of big directory trees managed by others, where the work-around is nor feasible. Work around 1: readme file in *every* subdir, empty (length=0) if none wanted (and subsequent changes in the used XSL-Transformers) Work around 2: Change "may" to "must" in docu. Repair: fix DefaultServlet From web.xml: <servlet> <servlet-name>default</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> <init-param> <param-name>globalXsltFile</param-name> <param-value>D:\www\serv-intra\meva-dir-li.xsl</param-value> </init-param> <init-param> <param-name>readmeFile</param-name> <param-value>readme.htm</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>
Created attachment 21461 [details] Patch to DefaultServlet.java Patch is for tomcat6 trunk. When the readme resource is not found. A NamingException is thrown instead of assuming null is returned. Patch eats the NamingException and returns null as well as optionally logs it if debugging turned up very high. Same condition can occur with the localxslt lookup.
applied to version 6.0.17+