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=30415>.
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=30415

DocBase folders that end with .war are incorrectly handled as WAR files

           Summary: DocBase folders that end with .war are incorrectly
                    handled as WAR files
           Product: Tomcat 5
           Version: 5.0.27
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If a "Context" is defined with a doc base that is a folder ending with ".war", 
the SetDocBaseRule class misinterprets that as a WAR file that it needs to read 
using ExpandWar.  This fails with the following stack trace:

java.util.zip.ZipException: Access is denied
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:112)
        at java.util.jar.JarFile.<init>(JarFile.java:127)
        at java.util.jar.JarFile.<init>(JarFile.java:65)
        at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:55)
        at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:40)
        at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78)
        at sun.net.www.protocol.jar.JarURLConnection.connect
(JarURLConnection.java:85)
        at sun.net.www.protocol.jar.JarURLConnection.getJarFile
(JarURLConnection.java:69)
        at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:155)
        at org.apache.catalina.startup.SetDocBaseRule.begin
(SetDocBaseRule.java:129)
        at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
        at org.apache.catalina.util.CatalinaDigester.startElement
(CatalinaDigester.java:65)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
Source)
...

What should happen is that the folder is recognized as such and read like 
normal.  This bug (or at least the effect) has existed since at least tomcat 
4.1.27.

Possible fix note:
The problem comes from SetDocBaseRule line 123.  If the test first looked to 
see if it was a folder, this problem could be avoided.

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

Reply via email to