Expose the new WebappLoader flag in the VirtualWebappLoader,
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 22 Apr 2010 13:11:24 +0000 (13:11 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 22 Apr 2010 13:11:24 +0000 (13:11 +0000)
but allow alternative name searchVirtualFirst to make it
consistent with the "virtual" terminology.

Now you can decide, whether the virtual paths will
be searched before the webapp or after it.

If searched before, external resources take precendence
over internal ones. Before that change one couldn't overwrite
resources already present in the webapp.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@936825 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/loader/VirtualWebappLoader.java
java/org/apache/catalina/loader/mbeans-descriptors.xml

index ed2adc8..bb9ea14 100644 (file)
@@ -82,6 +82,20 @@ public class VirtualWebappLoader extends WebappLoader {
     }
 
     /**
+     * @return Returns searchVirtualFirst.
+     */
+    public boolean getSearchVirtualFirst() {
+        return getSearchExternalFirst();
+    }
+
+    /**
+     * @param searchVirtualFirst Whether the virtual class path should be searched before the webapp
+     */
+    public void setSearchVirtualFirst(boolean searchVirtualFirst) {
+        setSearchExternalFirst(searchVirtualFirst);
+    }
+
+    /**
      * Implement the requirements
      * of {@link LifecycleBase#startInternal()}.
      *
index 2474f1f..06fc5ad 100644 (file)
           description="The reloadable flag for this Loader"
                  type="boolean"/>
 
+    <attribute   name="searchVirtualFirst"
+          description="The searchVirtualFirst flag for this Loader"
+                 type="boolean"/>
+
     <attribute   name="repositories"
           description="Extra repositories managed by this loader"
                  type="[Ljava.lang.String;"/>