Modified: velocity/site/production/engine/2.0/vtl-reference.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/vtl-reference.html?rev=1834410&r1=1834409&r2=1834410&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/vtl-reference.html (original)
+++ velocity/site/production/engine/2.0/vtl-reference.html Tue Jun 26 10:03:18 
2018
@@ -400,17 +400,17 @@ h2:hover > .headerlink, h3:hover > .head
 <li>Range operator: <code>#foreach ( $item in [1..3] )</code></li>
 </ul>
 <p>Velocity provides an easy way to get the loop counter so that you can do 
something like the following:</p>
-<div class="codehilite"><pre><span class="nt">&lt;table&gt;</span>
-#foreach( $customer in $customerList )
-    <span class="nt">&lt;tr&gt;&lt;td&gt;</span>$foreach.count<span 
class="nt">&lt;/td&gt;&lt;td&gt;</span>$customer.Name<span 
class="nt">&lt;/td&gt;&lt;/tr&gt;</span>
-#end
-<span class="nt">&lt;/table&gt;</span>
+<div class="codehilite"><pre><span class="p">&lt;</span><span 
class="nt">table</span><span class="p">&gt;</span>
+<span class="cp">#</span><span class="nf">foreach</span><span 
class="p">(</span> <span class="p">$</span><span class="nv">customer</span> 
<span class="o">in</span> <span class="p">$</span><span 
class="nv">customerList</span> <span class="p">)</span>
+    <span class="p">&lt;</span><span class="nt">tr</span><span 
class="p">&gt;&lt;</span><span class="nt">td</span><span 
class="p">&gt;$</span><span class="nv">foreach</span><span 
class="p">.</span><span class="nv">count</span><span 
class="p">&lt;/</span><span class="nt">td</span><span 
class="p">&gt;&lt;</span><span class="nt">td</span><span 
class="p">&gt;$</span><span class="nv">customer</span><span 
class="p">.</span><span class="nv">Name</span><span class="p">&lt;/</span><span 
class="nt">td</span><span class="p">&gt;&lt;/</span><span 
class="nt">tr</span><span class="p">&gt;</span>
+<span class="cp">#</span><span class="nf">end</span>
+<span class="p">&lt;/</span><span class="nt">table</span><span 
class="p">&gt;</span>
 </pre></div>
 
 
-<p>Additionally, the maximum allowed number of loop iterations can be 
controlled engine-wide (an ability introduced in Velocity 1.5). By default, 
there is no limit:</p>
-<div class="codehilite"><pre># The maximum allowed number of loops.
-directive.foreach.maxloops = -1
+<p>Additionally, the maximum allowed number of loop iterations can be 
controlled engine-wide with <code>velocity.properties</code>. By default, there 
is no limit:</p>
+<div class="codehilite"><pre><span class="c"># The maximum allowed number of 
loops.</span>
+<span class="na">directive.foreach.maxloops</span> <span class="o">=</span> 
<span class="s">-1</span>
 </pre></div>
 
 
@@ -484,12 +484,12 @@ directive.foreach.maxloops = -1
 <li><em>[ VM VTL code... ]</em> - Any valid VTL code, anything you can put 
into a template, can be put into a VM.</li>
 </ul>
 <p>Once defined, the VM is used like any other VTL directive in a template.</p>
-<div class="codehilite"><pre>#vmname( $arg1 $arg2 )
+<div class="codehilite"><pre><span class="cp">#</span><span 
class="nf">vmname</span><span class="p">(</span> <span class="p">$</span><span 
class="nv">arg1</span> <span class="p">$</span><span class="nv">arg2</span> 
<span class="p">)</span><span class="x"></span>
 </pre></div>
 
 
 <p><strong>Except</strong>, that when you wish to call a VM with a body, then 
you must prefix the name of the VM with @.  The content of that body may be 
referenced in the macro definition via $!bodyContent as many or few times as 
you like.</p>
-<div class="codehilite"><pre>#@vmname( $arg1 $arg2 ) here is the body#end
+<div class="codehilite"><pre><span class="err">#</span><span 
class="x">@vmname( </span><span class="p">$</span><span 
class="nv">arg1</span><span class="x"> </span><span class="p">$</span><span 
class="nv">arg2</span><span class="x"> ) here is the body</span><span 
class="cp">#</span><span class="nf">end</span><span class="x"></span>
 </pre></div>
 
 
@@ -502,31 +502,31 @@ directive.foreach.maxloops = -1
 <p>Comments are not rendered at runtime.</p>
 <h3 id="single-line-comments">Single Line Comments<a class="headerlink" 
href="#single-line-comments" title="Permanent link">&para;</a></h3>
 <p>Example:</p>
-<div class="codehilite"><pre>## This is a comment.**
+<div class="codehilite"><pre><span class="cp">##</span><span class="c"> This 
is a comment.**</span><span class="x"></span>
 </pre></div>
 
 
 <h3 id="multi-line-comments">Multi Line Comments<a class="headerlink" 
href="#multi-line-comments" title="Permanent link">&para;</a></h3>
 <p>Example:</p>
-<div class="codehilite"><pre>#**
-  This is a multiline comment.
-  This is the second line.
-*#
+<div class="codehilite"><pre><span class="cp">#</span><span class="c">**</span>
+<span class="c">  This is a multiline comment.</span>
+<span class="c">  This is the second line.</span>
+<span class="c">*</span><span class="cp">#</span><span class="x"></span>
 </pre></div>
 
 
 <h2 id="unparsed-content">Unparsed Content<a class="headerlink" 
href="#unparsed-content" title="Permanent link">&para;</a></h2>
 <p>Unparsed content is rendered at runtime, but is not parsed or 
interpreted.</p>
 <p>Example:</p>
-<div class="codehilite"><pre>#[[
+<div class="codehilite"><pre><span class="err">#</span><span 
class="x">[[</span>
 
-This has invalid syntax that would normally need 
-&quot;poor man&#39;s escaping&quot; like:
+<span class="x">This has invalid syntax that would normally need </span>
+<span class="x">&quot;poor man&#39;s escaping&quot; like:</span>
 
- - #define()
- - ${blah
+<span class="x"> - </span><span class="cp">#</span><span 
class="nf">define</span><span class="p">()</span><span class="x"></span>
+<span class="x"> - </span><span class="p">${</span><span 
class="nv">blah</span><span class="x"></span>
 
-]]#
+<span class="x">]]</span><span class="err">#</span><span class="x"></span>
 </pre></div></div></div>
         <hr/>
         <div id="copyright">

Modified: velocity/site/production/engine/2.0/webapps.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/webapps.html?rev=1834410&r1=1834409&r2=1834410&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/webapps.html (original)
+++ velocity/site/production/engine/2.0/webapps.html Tue Jun 26 10:03:18 2018
@@ -249,33 +249,33 @@ providing a consistent way to mark up te
 <p>Really, any of the other ResourceLoader implementations out there are 
preferred, but all the other ResourceLoaders shipped with Velocity Engine will 
require you to store your templates somewhere besides the standard file system 
(e.g. in the classpath, in a database, or on a remote server).  If that works 
for you, then great!  However, we recognize that these are not convenient for 
most people's development cycle.</p>
 <p>The simplest replacement for FileResourceLoader in a web application is 
actually a part of the VelocityTools project.  It is the <a 
href="/tools/devel/apidocs/org/apache/velocity/tools/view/WebappResourceLoader.html">WebappResourceLoader</a>
 This ResourceLoader implementation is specifically designed to work just like 
the FileResourceLoader, but it is aware of the servlet context and allows you 
to configure resource paths relative to the servlet root, rather than the local 
file system.</p>
 <p>If you are using the VelocityViewServlet, then it is automatically 
configured and ready to use the WebappResourceLoader. So if you want to change 
the configured path(s), you need only add a line like the following to your 
velocity.properties:</p>
-<div class="codehilite"><pre>webapp.resource.loader.path=/WEB-INF/mytemplates/
+<div class="codehilite"><pre><span 
class="na">webapp.resource.loader.path</span><span class="o">=</span><span 
class="s">/WEB-INF/mytemplates/</span>
 </pre></div>
 
 
 <p>If you need to set the WebappResourceLoader up on your own, then you can 
make your properties something like this:</p>
-<div class="codehilite"><pre>resource.loader=webapp
-webapp.resource.loader.class=org.apache.velocity.tools.view.WebappResourceLoader
-webapp.resource.loader.path=/WEB-INF/mytemplates/
+<div class="codehilite"><pre><span class="na">resource.loader</span><span 
class="o">=</span><span class="s">webapp</span>
+<span class="na">webapp.resource.loader.class</span><span 
class="o">=</span><span 
class="s">org.apache.velocity.tools.view.WebappResourceLoader</span>
+<span class="na">webapp.resource.loader.path</span><span 
class="o">=</span><span class="s">/WEB-INF/mytemplates/</span>
 </pre></div>
 
 
 <p>You will <strong>also need to put the ServletContext into your 
VelocityEngine's application attributes</strong> before initializing that 
Engine. This is how the WebappResourceLoader knows how to find templates.</p>
-<div 
class="codehilite"><pre>myVelocityEngine.setApplicationAttribute(&quot;javax.servlet.ServletContext&quot;,
 servletContext);
+<div class="codehilite"><pre><span class="n">myVelocityEngine</span><span 
class="o">.</span><span class="na">setApplicationAttribute</span><span 
class="o">(</span><span 
class="s">&quot;javax.servlet.ServletContext&quot;</span><span 
class="o">,</span> <span class="n">servletContext</span><span 
class="o">);</span>
 </pre></div>
 
 
 <h3 id="changing-object-state-dont">Changing Object State - Don't!<a 
class="headerlink" href="#changing-object-state-dont" title="Permanent 
link">&para;</a></h3>
 <p>Velocity provides the ability to call any method of an object acting as a 
reference.  This can be useful when displaying information into the page but is 
dangerous when object or application state is modified.</p>
 <p>For example, the following code safely calls the size() method of a list 
and displays the result.</p>
-<div class="codehilite"><pre>There are $users.size() currently logged in.
+<div class="codehilite"><pre><span class="x">There are </span><span 
class="p">$</span><span class="nv">users</span><span class="p">.</span><span 
class="nv">size</span><span class="p">()</span><span class="x"> currently 
logged in.</span>
 </pre></div>
 
 
 <p>An example of an unsafe operation concerns a financial web page with an 
object in the context that calculates data year by year.  The method 
calculateNextYear() calculates data for the next year and advances an internal 
counter:</p>
-<div class="codehilite"><pre>2005 data: $table.data
-$table.calculateNextYear()
-2006 data: $table.data
+<div class="codehilite"><pre><span class="x">2005 data: </span><span 
class="p">$</span><span class="nv">table</span><span class="p">.</span><span 
class="nv">data</span><span class="x"></span>
+<span class="p">$</span><span class="nv">table</span><span 
class="p">.</span><span class="nv">calculateNextYear</span><span 
class="p">()</span><span class="x"></span>
+<span class="x">2006 data: </span><span class="p">$</span><span 
class="nv">table</span><span class="p">.</span><span 
class="nv">data</span><span class="x"></span>
 </pre></div>
 
 
@@ -286,15 +286,15 @@ $table.calculateNextYear()
 <h3 id="escaping-htmlxml-entities">Escaping HTML/XML Entities<a 
class="headerlink" href="#escaping-htmlxml-entities" title="Permanent 
link">&para;</a></h3>
 <p>Any user-entered text that contains special HTML or XML entities (such as 
&lt;, &gt;, or &amp;) needs to be escaped before included in the web page.  
This is required, both to ensure the text is visible, and also to prevent 
dangerous <a 
href="http://en.wikipedia.org/wiki/Cross_site_scripting";>cross-site 
scripting</a>. Unlike, for example, JSTL (the Java Standard Tag Language found 
in Java Server Pages), Velocity does not escape references by default.</p>
 <p>However, Velocity provides the ability to specify a 
<code>ReferenceInsertionEventHandler</code> which will alter the value of a 
reference before it is inserted into the page. Specifically, you can configure 
the <code>EscapeHtmlReference</code> handler into your 
<code>velocity.properties</code> file to escape all references (optionally) 
matching a regular expression. The following example will escape HTML entities 
in any reference that starts with "msg" (e.g. <code>$msgText</code>).</p>
-<div class="codehilite"><pre>eventhandler.referenceinsertion.class = 
org.apache.velocity.app.event.implement.EscapeHtmlReference
-eventhandler.escape.html.match = /msg.*/
+<div class="codehilite"><pre><span 
class="na">eventhandler.referenceinsertion.class</span> <span 
class="o">=</span> <span 
class="s">org.apache.velocity.app.event.implement.EscapeHtmlReference</span>
+<span class="na">eventhandler.escape.html.match</span> <span 
class="o">=</span> <span class="s">/msg.*/</span>
 </pre></div>
 
 
 <p>Note that other kinds of escaping are sometimes required.  For example, in 
style sheets the @ character needs to be escaped, and in Javascript strings the 
single apostrophe ' needs to be escaped.</p>
 <h3 id="securing-the-application">Securing the Application<a 
class="headerlink" href="#securing-the-application" title="Permanent 
link">&para;</a></h3>
 <p>Since a web application is running on a central server, that typically has 
multiple users and confidential resources, care must be taken to make certain 
that the web application is secure.  Most standard web security principles 
apply to a web application built with Velocity.  A few specific issues (such as 
system configuration, more on cross-site scripting, and method introspection) 
are written up in this article on <a 
href="http://wiki.apache.org/velocity/BuildingSecureWebApplications";>Building 
Secure Applications with Velocity</a>. In particular, you may want to prevent 
template designers from including "dangerous" reflection-related methods by 
specifying the <code>SecureUberspector</code> to get/set properties and execute 
method calls.</p>
-<div class="codehilite"><pre>runtime.introspector.uberspect = 
org.apache.velocity.util.introspection.SecureUberspector
+<div class="codehilite"><pre><span 
class="na">runtime.introspector.uberspect</span> <span class="o">=</span> <span 
class="s">org.apache.velocity.util.introspection.SecureUberspector</span>
 </pre></div>
 
 
@@ -317,7 +317,8 @@ eventhandler.escape.html.match = /msg.*/
 </li>
 </ol>
 <p>3.Take a look at the "examples" directory. You will see a file "index.vm".  
Here's an excerpt:</p>
-<div class="codehilite"><pre>    <span class="nt">&lt;html&gt;</span>
+<div class="codehilite"><pre>    :::html+velocity
+    <span class="nt">&lt;html&gt;</span>
     <span class="nt">&lt;body&gt;</span>
     I&#39;m a velocity template.
 
@@ -342,7 +343,8 @@ eventhandler.escape.html.match = /msg.*/
 
 
 <p>You can copy any additional velocity files into this same directory.  In 
<code>examples/WEB-INF</code> you will see a file "tools.xml".  This specifies 
a list of "Tools" that are automatically included in the context.</p>
-<div class="codehilite"><pre>    <span class="nt">&lt;tools&gt;</span>
+<div class="codehilite"><pre>    :::xml
+    <span class="nt">&lt;tools&gt;</span>
         <span class="nt">&lt;data</span> <span class="na">type=</span><span 
class="s">&quot;boolean&quot;</span> <span class="na">key=</span><span 
class="s">&quot;xhtml&quot;</span> <span class="na">value=</span><span 
class="s">&quot;true&quot;</span><span class="nt">/&gt;</span>
         <span class="nt">&lt;data</span> <span class="na">type=</span><span 
class="s">&quot;boolean&quot;</span> <span class="na">key=</span><span 
class="s">&quot;isSimple&quot;</span> <span class="na">value=</span><span 
class="s">&quot;true&quot;</span><span class="nt">/&gt;</span>
         <span class="nt">&lt;data</span> <span class="na">type=</span><span 
class="s">&quot;number&quot;</span> <span class="na">key=</span><span 
class="s">&quot;version&quot;</span> <span class="na">value=</span><span 
class="s">&quot;2.0&quot;</span><span class="nt">/&gt;</span>
@@ -359,7 +361,8 @@ eventhandler.escape.html.match = /msg.*/
 
 
 <p>And finally the web.xml file specifies the name of the servlet and location 
of toolbox.properties.</p>
-<div class="codehilite"><pre>    <span class="nt">&lt;web-app&gt;</span>
+<div class="codehilite"><pre>    :::xml
+    <span class="nt">&lt;web-app&gt;</span>
       <span class="nt">&lt;servlet&gt;</span>
         <span class="nt">&lt;servlet-name&gt;</span>velocity<span 
class="nt">&lt;/servlet-name&gt;</span>
         <span 
class="nt">&lt;servlet-class&gt;</span>org.apache.velocity.tools.view.VelocityViewServlet<span
 class="nt">&lt;/servlet-class&gt;</span>

Modified: velocity/site/production/engine/devel/build.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/devel/build.html?rev=1834410&r1=1834409&r2=1834410&view=diff
==============================================================================
--- velocity/site/production/engine/devel/build.html (original)
+++ velocity/site/production/engine/devel/build.html Tue Jun 26 10:03:18 2018
@@ -232,7 +232,7 @@ h2:hover > .headerlink, h3:hover > .head
 <h2 id="building-from-sources">Building from Sources<a class="headerlink" 
href="#building-from-sources" title="Permanent link">&para;</a></h2>
 <p>In each case below, it is assumed that you were successful in <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/trunk velocity
-cd velocity
+<span class="nb">cd</span> velocity
 mvn install
 </pre></div>
 

Modified: velocity/site/production/engine/devel/configuration.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/devel/configuration.html?rev=1834410&r1=1834409&r2=1834410&view=diff
==============================================================================
--- velocity/site/production/engine/devel/configuration.html (original)
+++ velocity/site/production/engine/devel/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 &gt; 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 &lt;= 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">&para;</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 &#39;file&#39;, 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 &#39;class&#39;, 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 &#39;jar&#39;, 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 &#39;file&#39;, 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 &#39;class&#39;, 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 &#39;jar&#39;, 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>
 
 


Reply via email to