tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1377785 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Date Mon, 27 Aug 2012 18:40:10 GMT
Author: markt
Date: Mon Aug 27 18:40:09 2012
New Revision: 1377785

URL: http://svn.apache.org/viewvc?rev=1377785&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53783
Handle case where tool generating JARs does not generate entries for directories.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1377785&r1=1377784&r2=1377785&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Aug 27 18:40:09 2012
@@ -1590,8 +1590,15 @@ public class ContextConfig implements Li
                 // Note: Ignore file URLs for now since only jar URLs will be accepted
                 if ("jar".equals(url.getProtocol())) {
                     jar = JarFactory.newInstance(url);
-                    if (jar.entryExists("META-INF/resources/")) {
-                        context.addResourceJarUrl(url);
+                    jar.nextEntry();
+                    String entryName = jar.getEntryName();
+                    while (entryName != null) {
+                        if (entryName.startsWith("META-INF/resources/")) {
+                            context.addResourceJarUrl(url);
+                            break;
+                        }
+                        jar.nextEntry();
+                        entryName = jar.getEntryName();
                     }
                 } else if ("file".equals(url.getProtocol())) {
                     FileDirContext fileDirContext = new FileDirContext();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message