Author: rjung Date: Thu Apr 22 13:11:24 2010 New Revision: 936825 URL: http://svn.apache.org/viewvc?rev=936825&view=rev Log: 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. Modified: tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java tomcat/trunk/java/org/apache/catalina/loader/mbeans-descriptors.xml Modified: tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java?rev=936825&r1=936824&r2=936825&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java Thu Apr 22 13:11:24 2010 @@ -82,6 +82,20 @@ public class VirtualWebappLoader extends } /** + * @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()}. * Modified: tomcat/trunk/java/org/apache/catalina/loader/mbeans-descriptors.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/mbeans-descriptors.xml?rev=936825&r1=936824&r2=936825&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/loader/mbeans-descriptors.xml (original) +++ tomcat/trunk/java/org/apache/catalina/loader/mbeans-descriptors.xml Thu Apr 22 13:11:24 2010 @@ -89,6 +89,10 @@ 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;"/> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org