Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2DC76D4E2 for ; Mon, 27 Aug 2012 18:44:06 +0000 (UTC) Received: (qmail 2545 invoked by uid 500); 27 Aug 2012 18:44:05 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 2457 invoked by uid 500); 27 Aug 2012 18:44:05 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 2448 invoked by uid 99); 27 Aug 2012 18:44:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2012 18:44:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2012 18:44:02 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 499BD23888EA for ; Mon, 27 Aug 2012 18:43:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1377786 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/ContextConfig.java webapps/docs/changelog.xml Date: Mon, 27 Aug 2012 18:43:19 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120827184319.499BD23888EA@eris.apache.org> Author: markt Date: Mon Aug 27 18:43:18 2012 New Revision: 1377786 URL: http://svn.apache.org/viewvc?rev=1377786&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. Patch by Violeta Georgieva. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1377785 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1377786&r1=1377785&r2=1377786&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Aug 27 18:43:18 2012 @@ -1684,8 +1684,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(); Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1377786&r1=1377785&r2=1377786&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Aug 27 18:43:18 2012 @@ -168,6 +168,11 @@ wrong point because the isMatchAfter logic was inverted. (markt) + + 53783: Correctly handle JARs generated by tools that do not + create specific entries for directories. Patch provided by Violeta + Georgieva. (markt) + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org