You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/07/30 18:21:17 UTC
DO NOT REPLY [Bug 30415] New: -
DocBase folders that end with .war are incorrectly handled as WAR files
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: tomcat-dev@jakarta.apache.org
ReportedBy: miles.chaston@vignette.com
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org