tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1292334 - in /tomcat/trunk: java/org/apache/catalina/loader/VirtualWebappLoader.java webapps/docs/config/context.xml webapps/docs/config/loader.xml
Date Wed, 22 Feb 2012 15:03:46 GMT
Author: kkolinko
Date: Wed Feb 22 15:03:46 2012
New Revision: 1292334

URL: http://svn.apache.org/viewvc?rev=1292334&view=rev
Log:
Document that VirtualWebappLoader#virtualClasspath trims spaces from the values.
Use this feature to make documentation examples more readable.

Modified:
    tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java
    tomcat/trunk/webapps/docs/config/context.xml
    tomcat/trunk/webapps/docs/config/loader.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=1292334&r1=1292333&r2=1292334&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java (original)
+++ tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java Wed Feb 22 15:03:46
2012
@@ -35,7 +35,8 @@ import org.apache.catalina.LifecycleExce
  * <pre>
  * &lt;Context docBase="\webapps\mydocbase">
  *   &lt;Loader className="org.apache.catalina.loader.VirtualWebappLoader"
- *              virtualClasspath="/dir/classes;/somedir/somejar.jar;/somedir/*.jar"/>
+ *              virtualClasspath="/dir/classes;/somedir/somejar.jar;
+ *                /somedir/*.jar"/>
  * &lt;/Context>
  * </pre>
  *

Modified: tomcat/trunk/webapps/docs/config/context.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1292334&r1=1292333&r2=1292334&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Wed Feb 22 15:03:46 2012
@@ -1283,9 +1283,10 @@ mywebapp/
 <source>
 &lt;Context path="/mywebapp" docBase="/Users/theuser/mywebapp/src/main/webapp" >
   &lt;Resources className="org.apache.naming.resources.VirtualDirContext"
-                extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes"
/>
+    extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes" />
   &lt;Loader className="org.apache.catalina.loader.VirtualWebappLoader"
-             virtualClasspath="/Users/theuser/mywebapp/target/classes;/Users/theuser/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar"
/>
+    virtualClasspath="/Users/theuser/mywebapp/target/classes;
+      /Users/theuser/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar" />
   &lt;JarScanner scanAllDirectories="true" />
 &lt;/Context>
 </source>
@@ -1320,14 +1321,16 @@ mywebapp/
 <source>
 &lt;Context path="/mywebapp" docBase="/Users/theuser/mywebapp/src/main/webapp" >
   &lt;Resources className="org.apache.naming.resources.VirtualDirContext"
-             extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes,/pictures=/Users/theuser/mypictures,/movies=/Users/theuser/mymovies"
/>
+    extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes,/pictures=/Users/theuser/mypictures,/movies=/Users/theuser/mymovies"
/>
   &lt;Loader className="org.apache.catalina.loader.VirtualWebappLoader"
-             virtualClasspath="/Users/theuser/mywebapp/target/classes;/Users/theuser/mylib/target/classes;/Users/theuser/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar"
/>
+    virtualClasspath="/Users/theuser/mywebapp/target/classes;
+      /Users/theuser/mylib/target/classes;
+      /Users/theuser/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar" />
   &lt;JarScanner scanAllDirectories="true" />
 &lt;/Context>
 </source>
     <p>Note that resources in mylib/target/classes/META-INF/resources/ are mapped to
/ as
-    required by servlet 3 specifications.</p>
+    required by servlet 3 specification.</p>
   </subsection>
 </section>
 

Modified: tomcat/trunk/webapps/docs/config/loader.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/loader.xml?rev=1292334&r1=1292333&r2=1292334&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/loader.xml (original)
+++ tomcat/trunk/webapps/docs/config/loader.xml Wed Feb 22 15:03:46 2012
@@ -151,8 +151,14 @@
 
       <attribute name="virtualClasspath" required="false">
         <p>Additional repositories to search for resources.
-        Multiple elements can be joined using <code>;</code>
+        Multiple values can be joined using <code>;</code>
         as a separator.</p>
+        <p>Leading and trailing whitespaces in values are ignored.
+        If a value does not point to an existing directory or
+        <code>*.jar</code> file, it is silently skipped.
+        Diagnostic messages can be seen if you enable debug logging for
+        the VirtualWebappLoader class.
+        </p>
         <p>Example: <code>virtualClasspath=&quot;${catalina.base}/myapp_config&quot;</code></p>
       </attribute>
 



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


Mime
View raw message