Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 93926 invoked from network); 30 Dec 2009 09:24:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Dec 2009 09:24:47 -0000 Received: (qmail 99277 invoked by uid 500); 30 Dec 2009 09:24:46 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 99194 invoked by uid 500); 30 Dec 2009 09:24:46 -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 99181 invoked by uid 99); 30 Dec 2009 09:24:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2009 09:24:46 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 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; Wed, 30 Dec 2009 09:24:39 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 266682388994; Wed, 30 Dec 2009 09:24:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r894572 - /tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java Date: Wed, 30 Dec 2009 09:24:18 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091230092419.266682388994@eris.apache.org> Author: markt Date: Wed Dec 30 09:24:17 2009 New Revision: 894572 URL: http://svn.apache.org/viewvc?rev=894572&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48443 Correct FileNotFoundException on ROOT context start when annotation scanning is enabled Patch provided by wujunchen Modified: tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java Modified: tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java?rev=894572&r1=894571&r2=894572&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java (original) +++ tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java Wed Dec 30 09:24:17 2009 @@ -426,9 +426,17 @@ if (collection != null) { try { String file = getURL().getFile(); - // This will be of the form ////file name + // if is not empty otherwise this will be of the + // form //file name // Strip off the hostname and the contextpath - int start = file.indexOf('/', file.indexOf('/', 1) + 1); + int start; + if(context instanceof ProxyDirContext && + "".equals(((ProxyDirContext)context).getContextName())){ + start = file.indexOf('/',1); + } + else + start = file.indexOf('/', file.indexOf('/', 1) + 1); NamingEnumeration enumeration = context.list(file.substring(start)); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org