DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44337>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44337

           Summary: Dir listing crashes if no readme-file present
           Product: Tomcat 6
           Version: 6.0.14
          Platform: Sun
               URL: http://www.a-weinert.de
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


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>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to