Author: cbrisson
Date: Tue Jun 26 10:03:18 2018
New Revision: 1834410
URL: http://svn.apache.org/viewvc?rev=1834410&view=rev
Log:
[site] Proper syntax coloring for VTL, Java, XML, ... => into prod
Modified:
velocity/site/production/engine/2.0/build.html
velocity/site/production/engine/2.0/configuration.html
velocity/site/production/engine/2.0/developer-guide.html
velocity/site/production/engine/2.0/source-repository.html
velocity/site/production/engine/2.0/user-guide.html
velocity/site/production/engine/2.0/vtl-reference.html
velocity/site/production/engine/2.0/webapps.html
velocity/site/production/engine/devel/build.html
velocity/site/production/engine/devel/configuration.html
velocity/site/production/engine/devel/developer-guide.html
velocity/site/production/engine/devel/source-repository.html
velocity/site/production/engine/devel/user-guide.html
velocity/site/production/engine/devel/vtl-reference.html
velocity/site/production/engine/devel/webapps.html
velocity/site/production/tools/2.0/config-java.html
velocity/site/production/tools/2.0/config-properties.html
velocity/site/production/tools/2.0/creating-tools.html
velocity/site/production/tools/2.0/standalone.html
velocity/site/production/tools/2.0/view-layoutservlet.html
velocity/site/production/tools/2.0/view-servlet.html
velocity/site/production/tools/2.0/view-tag.html
velocity/site/production/tools/devel/config-java.html
velocity/site/production/tools/devel/config-properties.html
velocity/site/production/tools/devel/creating-tools.html
velocity/site/production/tools/devel/generic.html
velocity/site/production/tools/devel/standalone.html
velocity/site/production/tools/devel/view-layoutservlet.html
velocity/site/production/tools/devel/view-servlet.html
velocity/site/production/tools/devel/view-tag.html
Modified: velocity/site/production/engine/2.0/build.html
URL:
http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/build.html?rev=1834410&r1=1834409&r2=1834410&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/build.html (original)
+++ velocity/site/production/engine/2.0/build.html Tue Jun 26 10:03:18 2018
@@ -232,7 +232,7 @@ h2:hover > .headerlink, h3:hover > .head
<h2 id="building">Building<a class="headerlink" href="#building"
title="Permanent link">¶</a></h2>
<p>In each case below, it is assumed that you were successful in <a
href="/download.cgi#engine">downloading</a> and unpacking the distribution
source or <a href="/download.cgi#source-code-repository">checking out the
sources from Subversion</a>:</p>
<div class="codehilite"><pre>svn checkout
https://svn.apache.org/repos/asf/velocity/engine/tags/2.0 velocity-2.0
-cd velocity-2.0
+<span class="nb">cd</span> velocity-2.0
mvn install
</pre></div>
Modified: velocity/site/production/engine/2.0/configuration.html
URL:
http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/configuration.html?rev=1834410&r1=1834409&r2=1834410&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/configuration.html (original)
+++ velocity/site/production/engine/2.0/configuration.html Tue Jun 26 10:03:18
2018
@@ -386,13 +386,13 @@ h2:hover > .headerlink, h3:hover > .head
<p>This is the number of seconds between modification checks when caching is
turned on. When this is an integer > 0, this represents the number of
seconds between checks to see if the template was modified. If the template
has been modified since last check, then it is reloaded and reparsed.
Otherwise nothing is done. When <= 0, no modification checks will take
place, and assuming that the property <code>cache</code> (above) is true, once
a template is loaded and parsed the first time it is used, it will not be
checked or reloaded after that until the application or servlet engine is
restarted.</p>
<p>To illustrate, here is an example taken right from the default Velocity
properties, showing how setting up the FileResourceLoader is managed</p>
</blockquote>
-<div class="codehilite"><pre>resource.loader = file
+<div class="codehilite"><pre><span class="na">resource.loader</span> <span
class="o">=</span> <span class="s">file</span>
-file.resource.loader.description = Velocity File Resource Loader
-file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
-file.resource.loader.path = .
-file.resource.loader.cache = false
-file.resource.loader.modificationCheckInterval = 2
+<span class="na">file.resource.loader.description</span> <span
class="o">=</span> <span class="s">Velocity File Resource Loader</span>
+<span class="na">file.resource.loader.class</span> <span class="o">=</span>
<span
class="s">org.apache.velocity.runtime.resource.loader.FileResourceLoader</span>
+<span class="na">file.resource.loader.path</span> <span class="o">=</span>
<span class="s">.</span>
+<span class="na">file.resource.loader.cache</span> <span class="o">=</span>
<span class="s">false</span>
+<span class="na">file.resource.loader.modificationCheckInterval</span> <span
class="o">=</span> <span class="s">2</span>
</pre></div>
@@ -521,76 +521,76 @@ file.resource.loader.modificationCheckIn
<h2 id="configuration-examples">Configuration Examples<a class="headerlink"
href="#configuration-examples" title="Permanent link">¶</a></h2>
<p>Configuring the resource loaders for Velocity is straightforward. The
properties that control the are listed in the <a
href="#Configuring_Resource_Loaders">resource configuration</a> section, for
further reference.</p>
<p>The first step in configuring one or more resource loaders is do 'declare'
them by name to Velocity. Use the property <code>resource.loader</code> and
list one or more loader names. You can use anything you want - these names are
used to associate configuration properties with a given loader.</p>
-<div class="codehilite"><pre>resource.loader = file
+<div class="codehilite"><pre><span class="na">resource.loader</span> <span
class="o">=</span> <span class="s">file</span>
</pre></div>
<p>That entry declares that we will have a resource loader known as 'file'.
The next thing to do is to set the important properties. The most critical is
to declare the class to use as the loader:</p>
-<div class="codehilite"><pre>file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
+<div class="codehilite"><pre><span
class="na">file.resource.loader.class</span> <span class="o">=</span> <span
class="s">org.apache.velocity.runtime.resource.loader.FileResourceLoader</span>
</pre></div>
<p>In this case, we are telling velocity that we are setting up
a resource loadercalled 'file', and are using the class
<code>org.apache.velocity.runtime.resource.loader.FileResourceLoader</code> to
be the class to use. The next thing we do is set the properties important to
this loader.</p>
-<div class="codehilite"><pre>file.resource.loader.path = /opt/templates
-file.resource.loader.cache = true
-file.resource.loader.modificationCheckInterval = 2
+<div class="codehilite"><pre><span class="na">file.resource.loader.path</span>
<span class="o">=</span> <span class="s">/opt/templates</span>
+<span class="na">file.resource.loader.cache</span> <span class="o">=</span>
<span class="s">true</span>
+<span class="na">file.resource.loader.modificationCheckInterval</span> <span
class="o">=</span> <span class="s">2</span>
</pre></div>
<p>Here, we set a few things. First, we set the path to find the templates to
be <code>/opt/templates</code>. Second, we turned caching on, so that after a
template or static file is read in, it is cached in memory. And finally, we
set the modification check interval to 2 seconds, allowing Velocity to check
for new templates.</p>
<p>Those are the basics. What follows are a few examples of different
configuraitons.</p>
<p><strong>Do-nothing Default Configuration: </strong> As the name says, there
is nothing you have to do or configure to get the default configuration. This
configuration uses the FileResourceLoader with the current directory as the
default resource path, and caching is off. As a properties set, this is
expressed as:</p>
-<div class="codehilite"><pre>resource.loader = file
+<div class="codehilite"><pre><span class="na">resource.loader</span> <span
class="o">=</span> <span class="s">file</span>
-file.resource.loader.description = Velocity File Resource Loader
-file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
-file.resource.loader.path = .
-file.resource.loader.cache = false
-file.resource.loader.modificationCheckInterval = 0
+<span class="na">file.resource.loader.description</span> <span
class="o">=</span> <span class="s">Velocity File Resource Loader</span>
+<span class="na">file.resource.loader.class</span> <span class="o">=</span>
<span
class="s">org.apache.velocity.runtime.resource.loader.FileResourceLoader</span>
+<span class="na">file.resource.loader.path</span> <span class="o">=</span>
<span class="s">.</span>
+<span class="na">file.resource.loader.cache</span> <span class="o">=</span>
<span class="s">false</span>
+<span class="na">file.resource.loader.modificationCheckInterval</span> <span
class="o">=</span> <span class="s">0</span>
</pre></div>
<p><strong>Multiple Template Path Configuration: </strong> This configuration
uses the FileResourceLoader with several directories as 'nodes' on the template
search path. We also want to use caching, and have the templates checked for
changes in 10 second intervals. As a properties set, this is expressed as:</p>
-<div class="codehilite"><pre>resource.loader = file
+<div class="codehilite"><pre><span class="na">resource.loader</span> <span
class="o">=</span> <span class="s">file</span>
-file.resource.loader.description = Velocity File Resource Loader
-file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
-file.resource.loader.path = /opt/directory1, /opt/directory2
-file.resource.loader.cache = true
-file.resource.loader.modificationCheckInterval = 10
+<span class="na">file.resource.loader.description</span> <span
class="o">=</span> <span class="s">Velocity File Resource Loader</span>
+<span class="na">file.resource.loader.class</span> <span class="o">=</span>
<span
class="s">org.apache.velocity.runtime.resource.loader.FileResourceLoader</span>
+<span class="na">file.resource.loader.path</span> <span class="o">=</span>
<span class="s">/opt/directory1, /opt/directory2</span>
+<span class="na">file.resource.loader.cache</span> <span class="o">=</span>
<span class="s">true</span>
+<span class="na">file.resource.loader.modificationCheckInterval</span> <span
class="o">=</span> <span class="s">10</span>
</pre></div>
<p><strong>Multiple Loader Configuration :</strong> This configuration sets
up three loaders at the same time, the FileResourceLoader, the
ClasspathResourceLoader, and the JarResourceLoader. The loaders are set-up such
that the FileResourceLoader is consulted first, then the
ClasspathResourceLoader, and finally the JarResourceLoader. This would allow
you to qickly drop a template into the file template area to replace on of the
templates found in the classpath (usually via a jar) without having to rebuild
the jar.</p>
-<div class="codehilite"><pre>#
-# specify three resource loaders to use
-#
-resource.loader = file, class, jar
-
-#
-# for the loader we call 'file', set the FileResourceLoader as the
-# class to use, turn off caching, and use 3 directories for templates
-#
-file.resource.loader.description = Velocity File Resource Loader
-file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
-file.resource.loader.path = templatedirectory1, anotherdirectory, foo/bar
-file.resource.loader.cache = false
-file.resource.loader.modificationCheckInterval = 0
-
-#
-# for the loader we call 'class', use the ClasspathResourceLoader
-#
-class.resource.loader.description = Velocity Classpath Resource Loader
-class.resource.loader.class =
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
-
-#
-# and finally, for the loader we call 'jar', use the JarResourceLoader
-# and specify two jars to load from
-#
-jar.resource.loader.description = Velocity Jar Resource Loader
-jar.resource.loader.class =
org.apache.velocity.runtime.resource.loader.JarResourceLoader
-jar.resource.loader.path = jar:file:/myjarplace/myjar.jar,
jar:file:/myjarplace/myjar2.jar
+<div class="codehilite"><pre><span class="c">#</span>
+<span class="c"># specify three resource loaders to use</span>
+<span class="c">#</span>
+<span class="na">resource.loader</span> <span class="o">=</span> <span
class="s">file, class, jar</span>
+
+<span class="c">#</span>
+<span class="c"># for the loader we call 'file', set the
FileResourceLoader as the</span>
+<span class="c"># class to use, turn off caching, and use 3 directories for
templates</span>
+<span class="c">#</span>
+<span class="na">file.resource.loader.description</span> <span
class="o">=</span> <span class="s">Velocity File Resource Loader</span>
+<span class="na">file.resource.loader.class</span> <span class="o">=</span>
<span
class="s">org.apache.velocity.runtime.resource.loader.FileResourceLoader</span>
+<span class="na">file.resource.loader.path</span> <span class="o">=</span>
<span class="s">templatedirectory1, anotherdirectory, foo/bar</span>
+<span class="na">file.resource.loader.cache</span> <span class="o">=</span>
<span class="s">false</span>
+<span class="na">file.resource.loader.modificationCheckInterval</span> <span
class="o">=</span> <span class="s">0</span>
+
+<span class="c">#</span>
+<span class="c"># for the loader we call 'class', use the
ClasspathResourceLoader</span>
+<span class="c">#</span>
+<span class="na">class.resource.loader.description</span> <span
class="o">=</span> <span class="s">Velocity Classpath Resource Loader</span>
+<span class="na">class.resource.loader.class</span> <span class="o">=</span>
<span
class="s">org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader</span>
+
+<span class="c">#</span>
+<span class="c"># and finally, for the loader we call 'jar', use the
JarResourceLoader</span>
+<span class="c"># and specify two jars to load from</span>
+<span class="c">#</span>
+<span class="na">jar.resource.loader.description</span> <span
class="o">=</span> <span class="s">Velocity Jar Resource Loader</span>
+<span class="na">jar.resource.loader.class</span> <span class="o">=</span>
<span
class="s">org.apache.velocity.runtime.resource.loader.JarResourceLoader</span>
+<span class="na">jar.resource.loader.path</span> <span class="o">=</span>
<span class="s">jar:file:/myjarplace/myjar.jar,
jar:file:/myjarplace/myjar2.jar</span>
</pre></div>