Fix the paths used for JAR resources
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 23 Jul 2010 12:37:45 +0000 (12:37 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 23 Jul 2010 12:37:45 +0000 (12:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@967073 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/naming/resources/BaseDirContext.java

index fc7d975..88dc0a4 100644 (file)
@@ -408,7 +408,7 @@ public abstract class BaseDirContext implements DirContext {
         for (DirContext altDirContext : altDirContexts) {
             if (altDirContext instanceof BaseDirContext){
                 path = ((BaseDirContext) altDirContext).getRealPath(
-                        "META-INF/resources/" + name);
+                        "/META-INF/resources" + name);
                 if (path != null)
                     return path;
             }
@@ -462,7 +462,7 @@ public abstract class BaseDirContext implements DirContext {
         // Check the alternate locations
         for (DirContext altDirContext : altDirContexts) {
             try {
-                obj = altDirContext.lookup("META-INF/resources/" + name);
+                obj = altDirContext.lookup("/META-INF/resources" + name);
                 if (obj != null)
                     return obj;
             } catch ( NamingException ex) {
@@ -686,7 +686,7 @@ public abstract class BaseDirContext implements DirContext {
         for (DirContext altDirContext : altDirContexts) {
             if (altDirContext instanceof BaseDirContext)
                 bindings = ((BaseDirContext) altDirContext).doListBindings(
-                        "META-INF/resources/" + name);
+                        "/META-INF/resources" + name);
             else {
                 try {
                     bindings = altDirContext.listBindings(name);
@@ -1043,7 +1043,7 @@ public abstract class BaseDirContext implements DirContext {
         for (DirContext altDirContext : altDirContexts) {
             if (altDirContext instanceof BaseDirContext)
                 attrs = ((BaseDirContext) altDirContext).doGetAttributes(
-                        "META-INF/resources/" + name, attrIds);
+                        "/META-INF/resources" + name, attrIds);
             else {
                 try {
                     attrs = altDirContext.getAttributes(name, attrIds);