tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r940405 - in /tomcat/trunk: java/org/apache/naming/resources/BaseDirContext.java test/org/apache/catalina/core/TestStandardContextResources.java test/webapp-3.0-fragments/WEB-INF/lib/resources2.jar
Date Mon, 03 May 2010 09:44:40 GMT
Author: pero
Date: Mon May  3 09:44:39 2010
New Revision: 940405

URL: http://svn.apache.org/viewvc?rev=940405&view=rev
Log:
Search to more jars and fix testcase!

Modified:
    tomcat/trunk/java/org/apache/naming/resources/BaseDirContext.java
    tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
    tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/lib/resources2.jar

Modified: tomcat/trunk/java/org/apache/naming/resources/BaseDirContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/BaseDirContext.java?rev=940405&r1=940404&r2=940405&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/BaseDirContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/BaseDirContext.java Mon May  3 09:44:39
2010
@@ -456,9 +456,13 @@ public abstract class BaseDirContext imp
         
         // Check the alternate locations
         for (DirContext altDirContext : altDirContexts) {
-            obj = altDirContext.lookup("META-INF/resources/" + name);
-            if (obj != null)
-                return obj;
+            try {
+                obj = altDirContext.lookup("META-INF/resources/" + name);
+                if (obj != null)
+                    return obj;
+            } catch ( NamingException ex) {
+                // ignore
+            }
         }
         
         // Really not found

Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=940405&r1=940404&r2=940405&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java (original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Mon May 
3 09:44:39 2010
@@ -84,7 +84,7 @@ public class TestStandardContextResource
         tomcat.start();
 
         assertPageContains("/test/getresource?path=/resourceF.jsp",
-                "<p>resourceF.jsp in the web application</p>");
+                "<p>resourceF.jsp in resources2.jar</p>");
         assertPageContains("/test/getresource?path=/resourceA.jsp",
                 "<p>resourceA.jsp in the web application</p>");
         assertPageContains("/test/getresource?path=/resourceB.jsp",

Modified: tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/lib/resources2.jar
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/lib/resources2.jar?rev=940405&r1=940404&r2=940405&view=diff
==============================================================================
Binary files - no diff available.



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


Mime
View raw message