From: rjung Date: Thu, 22 Apr 2010 13:11:24 +0000 (+0000) Subject: Expose the new WebappLoader flag in the VirtualWebappLoader, X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c0f88e4716024fcf72d079b626a3d4f55aba3a77;p=tomcat7.0 Expose the new WebappLoader flag in the VirtualWebappLoader, 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 --- diff --git a/java/org/apache/catalina/loader/VirtualWebappLoader.java b/java/org/apache/catalina/loader/VirtualWebappLoader.java index ed2adc8a2..bb9ea1423 100644 --- a/java/org/apache/catalina/loader/VirtualWebappLoader.java +++ b/java/org/apache/catalina/loader/VirtualWebappLoader.java @@ -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()}. * diff --git a/java/org/apache/catalina/loader/mbeans-descriptors.xml b/java/org/apache/catalina/loader/mbeans-descriptors.xml index 2474f1f2f..06fc5addd 100644 --- a/java/org/apache/catalina/loader/mbeans-descriptors.xml +++ b/java/org/apache/catalina/loader/mbeans-descriptors.xml @@ -89,6 +89,10 @@ description="The reloadable flag for this Loader" type="boolean"/> + +