Author: cbrisson
Date: Sat Jul 16 21:26:18 2016
New Revision: 1753000

URL: http://svn.apache.org/viewvc?rev=1753000&view=rev
Log:
[site] document encoding and API changes, as well as scripting

Modified:
    velocity/site/cms/trunk/content/engine/1.7/developer-guide.mdtext
    velocity/site/cms/trunk/content/engine/devel/developer-guide.mdtext
    velocity/site/cms/trunk/content/engine/devel/overview.mdtext
    velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext
    velocity/site/production/engine/1.7/developer-guide.html
    velocity/site/production/engine/devel/changes.html
    velocity/site/production/engine/devel/developer-guide.html
    velocity/site/production/engine/devel/overview.html
    velocity/site/production/engine/devel/upgrading.html

Modified: velocity/site/cms/trunk/content/engine/1.7/developer-guide.mdtext
URL: 
http://svn.apache.org/viewvc/velocity/site/cms/trunk/content/engine/1.7/developer-guide.mdtext?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/cms/trunk/content/engine/1.7/developer-guide.mdtext (original)
+++ velocity/site/cms/trunk/content/engine/1.7/developer-guide.mdtext Sat Jul 
16 21:26:18 2016
@@ -924,8 +924,6 @@ In general, you have the following loggi
     
     You can integrate Velocity's logging capabilities with your applications 
existing logging system, simply by implementing the 
`org.apache.velocity.runtime.log.LogChute` interface.  Then, pass an instance 
of your logging class to Velocity via the `runtime.log.logsystem` configuration 
key before initializing the Velocity engine, and Velocity will log messages to 
your application's logger. See the information on the [Velocity helper 
class](#Velocity-helper-class) as well as the [Configuration keys and 
values](#Configuration-keys-and-values).
 
-
-    </a></li> </ul> <a name="usinglog4jwithexistinglogger"><strong>
 ### Using Log4j With Existing Logger
 
 Here is an example of how to configure Velocity to log to an existing Log4j 
Logger.

Modified: velocity/site/cms/trunk/content/engine/devel/developer-guide.mdtext
URL: 
http://svn.apache.org/viewvc/velocity/site/cms/trunk/content/engine/devel/developer-guide.mdtext?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/cms/trunk/content/engine/devel/developer-guide.mdtext 
(original)
+++ velocity/site/cms/trunk/content/engine/devel/developer-guide.mdtext Sat Jul 
16 21:26:18 2016
@@ -708,13 +708,9 @@ Below are listed the configuration keys
 
 ### Character Encoding
 
-`input.encoding = ISO-8859-1`
+`input.encoding = UTF-8`
 
-> Character encoding for input (templates).  Using this, you can use 
alternative encoding for your templates, such as UTF-8.
-
-`output.encoding = ISO-8859-1`
-
-Character encoding for output streams from the VelocityServlet and Anakia.
+> Character encoding for input (templates). If not specified, Velocity relies 
on the 'file.encoding' system property.
 
 ### #define() Directive
 
@@ -1059,7 +1055,7 @@ Note that this applies only to the encod
 
 ## Velocity and XML
 
-Velocity's flexibility and simple template language makes it an ideal 
environment for working with XML data.  <a href="/anakia/">Anakia</a> is an 
example of how Velocity is used to replace XSL for rendering output from XML.  
The Velocity site, including this documentation, is generated from XML source 
using Anakia. The Jakarta site is also rendered using Anakia.
+Velocity's flexibility and simple template language makes it an ideal 
environment for working with XML data.
 
 Generally, the pattern for dealing with XML in Velocity is to use something 
like [JDOM](http://www.jdom.org/) to process your XML into a data structure 
with convenient Java access.  Then, you produce templates that access data 
directly out of the XML document - directly though the JDOM tree.  For example, 
start with an XML document such as:
 
@@ -1093,8 +1089,6 @@ Now make a little Java program that incl
     
     ...
 
-(See the Anakia source for details on how to do this, or the Anakia example in 
the `examples` directory in the distribution.)
-
 Now, make a regular Velocity template:
 
     <html>
@@ -1107,7 +1101,7 @@ Now, make a regular Velocity template:
 
 and render that template as you normally would, using the Context containing 
the JDOM tree. Of course, this isn't the prettiest of examples, but it shows 
the basics - that you can easily access XML data directly from a Velocity 
template.
 
-One real advantage of styling XML data in Velocity is that you have access to 
any other object or data that the application provides. You aren't limited to 
just using the data present in the XML document. You may add anything you want 
to the context to provide additional information for your output, or provide 
tools to help make working with the XML data easier. Bob McWhirter's [Werken 
XPath](http://sourceforge.net/projects/werken-xpath/) is one such useful tool - 
an example of how it is used in Anakia can be found in 
`org.apache.velocity.anakia.XPathTool`.
+One real advantage of styling XML data in Velocity is that you have access to 
any other object or data that the application provides. You aren't limited to 
just using the data present in the XML document. You may add anything you want 
to the context to provide additional information for your output, or provide 
tools to help make working with the XML data easier. Bob McWhirter's [Werken 
XPath](http://sourceforge.net/projects/werken-xpath/) is one such useful tool.
 
 One issue that arises with XML and Velocity is how to deal with XML entities. 
One technique is to combine the use of Velocimacros when you need to render an 
entity into the output stream:
 
@@ -1143,6 +1137,28 @@ Alternatively, since Velocity makes it e
 
 The previous suggestions for dealing with XML entities came from Christoph 
Reck, an active participant in the Velocity community.
 
+## Velocity Scripting
+
+Velocity can be integrated into the Java Scripting Language Framework (as 
defined by the [JSR-223 API](https://www.jcp.org/en/jsr/detail?id=223)).
+
+This section is a brief illustration of how to use Velocity Scripting 
framework through the JSR-223 API.
+
+Hello World example:
+
+    // get script manager, create a new Velocity script engine factory and get 
an engine from it
+    ScriptEngineManager manager = new ScriptEngineManager();
+    manager.registerEngineName("velocity", new VelocityScriptEngineFactory());
+    ScriptEngine engine = manager.getEngineByName("velocity");
+
+
+    System.setProperty(VelocityScriptEngine.VELOCITY_PROPERTIES, 
"path/to/velocity.properties");
+    String script = "Hello $world";
+    Writer writer = new StringWriter();
+    engine.getContext().setWriter(writer);
+    Object result = engine.eval(script);
+    System.out.println(writer);
+    
+
 ## Summary
 
 We hope this brief guide was a helpful introduction to using Velocity in your 
Java projects, and thank you for you interest in Velocity.  We welcome any and 
all comments you may have about this documentation and the Velocity template 
engine itself.

Modified: velocity/site/cms/trunk/content/engine/devel/overview.mdtext
URL: 
http://svn.apache.org/viewvc/velocity/site/cms/trunk/content/engine/devel/overview.mdtext?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/cms/trunk/content/engine/devel/overview.mdtext (original)
+++ velocity/site/cms/trunk/content/engine/devel/overview.mdtext Sat Jul 16 
21:26:18 2016
@@ -9,6 +9,8 @@ Velocity is a template engine that can b
 + Automatic emails. Many applications generate automatic emails for account 
signup, password reminders or automatically sent reports.  Using Velocity, the 
email template can be stored in a text file rather than directly embedded in 
your Java code.
 + XML transformation. Velocity provides an ant task called [Anakia](/anakia/) 
which reads an XML file and makes it available to a Velocity template. A common 
application is to convert documentation stored in a generic &quot;xdoc&quot; 
format into a styled HTML document.
 
+Since version 2.0, Velocity can also be [integrated as a scripting 
engine](developer-guide.html#velocity-scripting) into the Java Scripting 
Language Framework (as defined by the [JSR-223 
specification](https://www.jcp.org/en/jsr/detail?id=223)).
+
 ## How it works
 
 Velocity allows web page designers and other template writers to include 
markup statements called *references* in the page. These references are pulled 
from a *Context* object -- essentially a hashtable that provides get and set 
methods for retrieving and setting objects -- and the corresponding values are 
inserted directly in a page. Velocity provides basic control statements, that 
can loop over a collection of values (`foreach`) or conditionally show a block 
of text (`if`/`else`).  The ability to call arbitrary Java methods, include 
other files, and to create macros that can be repeatedly used make this a 
powerful yet easy-to-use approach for creating dynamic web page or other text 
files.

Modified: velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext
URL: 
http://svn.apache.org/viewvc/velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext (original)
+++ velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext Sat Jul 16 
21:26:18 2016
@@ -8,7 +8,7 @@ Release with the same major number (1.x)
 
 Behavior / API changes:
 
-+ the internal Context API now enforces String keys, this may break custom 
Context implementations at compile-time.
++ the internal Context API now enforces String keys everywhere, this may break 
custom Context implementations at compile-time.
 + invalid reference events are now more sparsely sent; they're not sent if 
*any* of the following conditions is met:
 
     + the reference is a quiet reference
@@ -16,6 +16,10 @@ Behavior / API changes:
     + the reference is tested for validity inside an #if / #elseif statement
 
     The 1.x behavior did send invalid reference events in all those cases.
+    
++ The `ResourceLoader` class has been deprecated in favor of a 
`ResourceLoader2` class, in which the `InputStream 
ResourceLoader.getResourceStream(String name)` has been replaced by a `Reader 
ResourceLoader.getResourceReader(String name, String encoding)`. Since 
`ResourceLoader` inherits from `ResourceLoader2`, the change remains backward 
compatible, but custom resource loaders should be upgraded to avoid 
deprecattion warnings.
++ The default encoding ('ISO-8859-1' in 1.x) is now read from the standard 
`file.encoding` Java system property.
++ The `output.encoding` configuration property has been removed.
 
 VTL Syntax changes:
 

Modified: velocity/site/production/engine/1.7/developer-guide.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/1.7/developer-guide.html?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/production/engine/1.7/developer-guide.html (original)
+++ velocity/site/production/engine/1.7/developer-guide.html Sat Jul 16 
21:26:18 2016
@@ -1144,10 +1144,9 @@ file.resource.loader.modificationCheckIn
 <p>You can create a custom logging class - you just need to implement the 
interface <code>org.apache.velocity.runtime.log.LogChute</code> and then simply 
set the  configuration property <code>runtime.log.logsystem.class</code> with 
the classname, and Velocity will create an instance of that class at init time. 
You may specify the classname as you specify any other properties. See the 
information on the <a href="#Velocity-helper-class">Velocity helper class</a> 
as well as the <a href="#Configuration-keys-and-values">Configuration keys and 
values</a>. Please note that the old 
<code>org.apache.velocity.runtime.log.LogSystem</code> interface has been 
deprecated for v1.5 in favor of the new LogChute interface. This is due to 
significant upgrades to our logging code that could not be supported by the 
LogSystem interface.  But don't worry, if you specify a custom class that 
implements the LogSystem interface, it will still work. However, it will 
generate deprecation warnings.  You should u
 pgrade your custom logger to implement LogChute as soon as possible.
 + <strong>Integrated Logging</strong></p>
 <p>You can integrate Velocity's logging capabilities with your applications 
existing logging system, simply by implementing the 
<code>org.apache.velocity.runtime.log.LogChute</code> interface.  Then, pass an 
instance of your logging class to Velocity via the 
<code>runtime.log.logsystem</code> configuration key before initializing the 
Velocity engine, and Velocity will log messages to your application's logger. 
See the information on the <a href="#Velocity-helper-class">Velocity helper 
class</a> as well as the <a href="#Configuration-keys-and-values">Configuration 
keys and values</a>.</p>
-<p></a></li> </ul> <a name="usinglog4jwithexistinglogger"><strong></p>
-<h3 id="using-log4j-with-existing-logger">Using Log4j With Existing Logger<a 
class="headerlink" href="#using-log4j-with-existing-logger" title="Permanent 
link">&para;</a></h3>
 </li>
 </ul>
+<h3 id="using-log4j-with-existing-logger">Using Log4j With Existing Logger<a 
class="headerlink" href="#using-log4j-with-existing-logger" title="Permanent 
link">&para;</a></h3>
 <p>Here is an example of how to configure Velocity to log to an existing Log4j 
Logger.</p>
 <div class="codehilite"><pre><span class="kn">import</span> <span 
class="nn">org.apache.velocity.app.VelocityEngine</span><span class="p">;</span>
 <span class="kn">import</span> <span 
class="nn">org.apache.velocity.runtime.RuntimeConstants</span><span 
class="p">;</span>

Modified: velocity/site/production/engine/devel/changes.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/devel/changes.html?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/production/engine/devel/changes.html (original)
+++ velocity/site/production/engine/devel/changes.html Sat Jul 16 21:26:18 2016
@@ -314,6 +314,27 @@ h2:hover > .headerlink, h3:hover > .head
     <tbody>
       <tr>
         <td>
+          <img src="images/add.png"/>
+        </td>
+        <td> Add a first implementation for the JSR 223 standard scripting 
interface. . Fixes <a 
href="https://issues.apache.org/jira/browse/VELOCITY-735";>VELOCITY-735</a>. 
Thanks to Dishara Wijewardana.</td>
+        <td>cbrusson</td>
+      </tr>
+      <tr>
+        <td>
+          <img src="images/fix.png"/>
+        </td>
+        <td> Fix Template default encoding initialization problem. . Fixes <a 
href="https://issues.apache.org/jira/browse/VELOCITY-809";>VELOCITY-809</a>. 
</td>
+        <td>cbrisson</td>
+      </tr>
+      <tr>
+        <td>
+          <img src="images/add.png"/>
+        </td>
+        <td> The ResourceLoader API now provides a Reader rather than an 
InputStream. The InputStream getter method has been deprecated. Also fixes 
VELOCITY-599. . Fixes <a 
href="https://issues.apache.org/jira/browse/VELOCITY-793";>VELOCITY-793</a>. 
</td>
+        <td>cbrisson</td>
+      </tr>
+      <tr>
+        <td>
           <img src="images/fix.png"/>
         </td>
         <td> InvalidReferenceHandler events should not be triggered by quiet 
references, null values, or by references testing inside #if / #elseif. Thanks 
to Renato Steiner for his testcase. . Fixes <a 
href="https://issues.apache.org/jira/browse/VELOCITY-553";>VELOCITY-553</a>. 
</td>

Modified: velocity/site/production/engine/devel/developer-guide.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/devel/developer-guide.html?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/production/engine/devel/developer-guide.html (original)
+++ velocity/site/production/engine/devel/developer-guide.html Sat Jul 16 
21:26:18 2016
@@ -294,6 +294,7 @@ h2:hover > .headerlink, h3:hover > .head
 </li>
 <li><a href="#template-encoding-for-internationalization">Template Encoding 
for Internationalization</a></li>
 <li><a href="#velocity-and-xml">Velocity and XML</a></li>
+<li><a href="#velocity-scripting">Velocity Scripting</a></li>
 <li><a href="#summary">Summary</a></li>
 </ul>
 </div>
@@ -948,12 +949,10 @@ eventhandler.escape.sql.match = /sql.*/
 <p>Allows user to specify an existing logger <em>name</em> in the Avalon 
hierarchy without having to wrap with a LogChute interface.  
<strong>Note:</strong> You must also specify <code>runtime.log.logsystem.class 
= org.apache.velocity.runtime.log.AvalonLogChute</code> as the default 
logsystem may change.  There is <strong>no</strong> guarantee that the Avalon 
log system will remain the default log system.</p>
 </blockquote>
 <h3 id="character-encoding">Character Encoding<a class="headerlink" 
href="#character-encoding" title="Permanent link">&para;</a></h3>
-<p><code>input.encoding = ISO-8859-1</code></p>
+<p><code>input.encoding = UTF-8</code></p>
 <blockquote>
-<p>Character encoding for input (templates).  Using this, you can use 
alternative encoding for your templates, such as UTF-8.</p>
+<p>Character encoding for input (templates). If not specified, Velocity relies 
on the 'file.encoding' system property.</p>
 </blockquote>
-<p><code>output.encoding = ISO-8859-1</code></p>
-<p>Character encoding for output streams from the VelocityServlet and 
Anakia.</p>
 <h3 id="define-directive">#define() Directive<a class="headerlink" 
href="#define-directive" title="Permanent link">&para;</a></h3>
 <p><code>define.provide.scope.control = false</code></p>
 <blockquote>
@@ -1270,7 +1269,7 @@ jar.resource.loader.path = jar:file:/myj
 <p>The value for the <em>encoding</em> argument is the conventional encoding 
specification supported by your JVM, for example "UTF-8" or "ISO-8859-1".  For 
the official names for character sets, see <a 
href="http://www.iana.org/assignments/character-sets";>here</a>.</p>
 <p>Note that this applies only to the encoding of the template itself - the 
output encoding is an application specific issue.</p>
 <h2 id="velocity-and-xml">Velocity and XML<a class="headerlink" 
href="#velocity-and-xml" title="Permanent link">&para;</a></h2>
-<p>Velocity's flexibility and simple template language makes it an ideal 
environment for working with XML data.  <a href="/anakia/">Anakia</a> is an 
example of how Velocity is used to replace XSL for rendering output from XML.  
The Velocity site, including this documentation, is generated from XML source 
using Anakia. The Jakarta site is also rendered using Anakia.</p>
+<p>Velocity's flexibility and simple template language makes it an ideal 
environment for working with XML data.</p>
 <p>Generally, the pattern for dealing with XML in Velocity is to use something 
like <a href="http://www.jdom.org/";>JDOM</a> to process your XML into a data 
structure with convenient Java access.  Then, you produce templates that access 
data directly out of the XML document - directly though the JDOM tree.  For 
example, start with an XML document such as:</p>
 <div class="codehilite"><pre><span class="nt">&lt;document&gt;</span>
   <span class="nt">&lt;properties&gt;</span>
@@ -1305,7 +1304,6 @@ vc.put(&quot;root&quot;, root.getRootEle
 </pre></div>
 
 
-<p>(See the Anakia source for details on how to do this, or the Anakia example 
in the <code>examples</code> directory in the distribution.)</p>
 <p>Now, make a regular Velocity template:</p>
 <div class="codehilite"><pre><span class="nt">&lt;html&gt;</span>
   <span class="nt">&lt;body&gt;</span>
@@ -1318,7 +1316,7 @@ vc.put(&quot;root&quot;, root.getRootEle
 
 <p></html></p>
 <p>and render that template as you normally would, using the Context 
containing the JDOM tree. Of course, this isn't the prettiest of examples, but 
it shows the basics - that you can easily access XML data directly from a 
Velocity template.</p>
-<p>One real advantage of styling XML data in Velocity is that you have access 
to any other object or data that the application provides. You aren't limited 
to just using the data present in the XML document. You may add anything you 
want to the context to provide additional information for your output, or 
provide tools to help make working with the XML data easier. Bob McWhirter's <a 
href="http://sourceforge.net/projects/werken-xpath/";>Werken XPath</a> is one 
such useful tool - an example of how it is used in Anakia can be found in 
<code>org.apache.velocity.anakia.XPathTool</code>.</p>
+<p>One real advantage of styling XML data in Velocity is that you have access 
to any other object or data that the application provides. You aren't limited 
to just using the data present in the XML document. You may add anything you 
want to the context to provide additional information for your output, or 
provide tools to help make working with the XML data easier. Bob McWhirter's <a 
href="http://sourceforge.net/projects/werken-xpath/";>Werken XPath</a> is one 
such useful tool.</p>
 <p>One issue that arises with XML and Velocity is how to deal with XML 
entities. One technique is to combine the use of Velocimacros when you need to 
render an entity into the output stream:</p>
 <div class="codehilite"><pre><span class="cp">##</span><span class="c"> first, 
define the Velocimacro somewhere</span>
 
@@ -1355,6 +1353,25 @@ vc.put(&quot;root&quot;, root.getRootEle
 
 
 <p>The previous suggestions for dealing with XML entities came from Christoph 
Reck, an active participant in the Velocity community.</p>
+<h2 id="velocity-scripting">Velocity Scripting<a class="headerlink" 
href="#velocity-scripting" title="Permanent link">&para;</a></h2>
+<p>Velocity can be integrated into the Java Scripting Language Framework (as 
defined by the <a href="https://www.jcp.org/en/jsr/detail?id=223";>JSR-223 
API</a>).</p>
+<p>This section is a brief illustration of how to use Velocity Scripting 
framework through the JSR-223 API.</p>
+<p>Hello World example:</p>
+<div class="codehilite"><pre><span class="x">// get script manager, create a 
new Velocity script engine factory and get an engine from it</span>
+<span class="x">ScriptEngineManager manager = new ScriptEngineManager();</span>
+<span class="x">manager.registerEngineName(&quot;velocity&quot;, new 
VelocityScriptEngineFactory());</span>
+<span class="x">ScriptEngine engine = 
manager.getEngineByName(&quot;velocity&quot;);</span>
+
+
+<span class="x">System.setProperty(VelocityScriptEngine.VELOCITY_PROPERTIES, 
&quot;path/to/velocity.properties&quot;);</span>
+<span class="x">String script = &quot;Hello </span><span 
class="p">$</span><span class="nv">world</span><span class="x">&quot;;</span>
+<span class="x">Writer writer = new StringWriter();</span>
+<span class="x">engine.getContext().setWriter(writer);</span>
+<span class="x">Object result = engine.eval(script);</span>
+<span class="x">System.out.println(writer);</span>
+</pre></div>
+
+
 <h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent 
link">&para;</a></h2>
 <p>We hope this brief guide was a helpful introduction to using Velocity in 
your Java projects, and thank you for you interest in Velocity.  We welcome any 
and all comments you may have about this documentation and the Velocity 
template engine itself.</p>
 <p>Please submit all detailed, thoughtful and constructive feedback through 
our <a href="/contact.html">mailing lists</a>.</p></div></div>

Modified: velocity/site/production/engine/devel/overview.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/devel/overview.html?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/production/engine/devel/overview.html (original)
+++ velocity/site/production/engine/devel/overview.html Sat Jul 16 21:26:18 2016
@@ -230,6 +230,7 @@ h2:hover > .headerlink, h3:hover > .head
 <li>Automatic emails. Many applications generate automatic emails for account 
signup, password reminders or automatically sent reports.  Using Velocity, the 
email template can be stored in a text file rather than directly embedded in 
your Java code.</li>
 <li>XML transformation. Velocity provides an ant task called <a 
href="/anakia/">Anakia</a> which reads an XML file and makes it available to a 
Velocity template. A common application is to convert documentation stored in a 
generic &quot;xdoc&quot; format into a styled HTML document.</li>
 </ul>
+<p>Since version 2.0, Velocity can also be <a 
href="developer-guide.html#velocity-scripting">integrated as a scripting 
engine</a> into the Java Scripting Language Framework (as defined by the <a 
href="https://www.jcp.org/en/jsr/detail?id=223";>JSR-223 specification</a>).</p>
 <h2 id="how-it-works">How it works<a class="headerlink" href="#how-it-works" 
title="Permanent link">&para;</a></h2>
 <p>Velocity allows web page designers and other template writers to include 
markup statements called <em>references</em> in the page. These references are 
pulled from a <em>Context</em> object -- essentially a hashtable that provides 
get and set methods for retrieving and setting objects -- and the corresponding 
values are inserted directly in a page. Velocity provides basic control 
statements, that can loop over a collection of values (<code>foreach</code>) or 
conditionally show a block of text (<code>if</code>/<code>else</code>).  The 
ability to call arbitrary Java methods, include other files, and to create 
macros that can be repeatedly used make this a powerful yet easy-to-use 
approach for creating dynamic web page or other text files.</p>
 <p>Velocity enforces a Model-View-Controller (MVC) style of development by 
separating Java code from HTML template code. Unlike JSPs, Velocity does not 
allow Java code to be embedded in pages. Unlike PHP, Velocity does not 
implement features with other functions. The MVC approach is one of Velocity's 
great strengths, and allows for more maintainable and better-designed web 
pages.</p>

Modified: velocity/site/production/engine/devel/upgrading.html
URL: 
http://svn.apache.org/viewvc/velocity/site/production/engine/devel/upgrading.html?rev=1753000&r1=1752999&r2=1753000&view=diff
==============================================================================
--- velocity/site/production/engine/devel/upgrading.html (original)
+++ velocity/site/production/engine/devel/upgrading.html Sat Jul 16 21:26:18 
2016
@@ -227,7 +227,7 @@ h2:hover > .headerlink, h3:hover > .head
 <h3 id="upgrading-from-velocity-17">Upgrading from Velocity 1.7<a 
class="headerlink" href="#upgrading-from-velocity-17" title="Permanent 
link">&para;</a></h3>
 <p>Behavior / API changes:</p>
 <ul>
-<li>the internal Context API now enforces String keys, this may break custom 
Context implementations at compile-time.</li>
+<li>the internal Context API now enforces String keys everywhere, this may 
break custom Context implementations at compile-time.</li>
 <li>
 <p>invalid reference events are now more sparsely sent; they're not sent if 
<em>any</em> of the following conditions is met:</p>
 <ul>
@@ -237,6 +237,11 @@ h2:hover > .headerlink, h3:hover > .head
 </ul>
 <p>The 1.x behavior did send invalid reference events in all those cases.</p>
 </li>
+<li>
+<p>The <code>ResourceLoader</code> class has been deprecated in favor of a 
<code>ResourceLoader2</code> class, in which the <code>InputStream 
ResourceLoader.getResourceStream(String name)</code> has been replaced by a 
<code>Reader ResourceLoader.getResourceReader(String name, String 
encoding)</code>. Since <code>ResourceLoader</code> inherits from 
<code>ResourceLoader2</code>, the change remains backward compatible, but 
custom resource loaders should be upgraded to avoid deprecattion warnings.</p>
+</li>
+<li>The default encoding ('ISO-8859-1' in 1.x) is now read from the standard 
<code>file.encoding</code> Java system property.</li>
+<li>The <code>output.encoding</code> configuration property has been 
removed.</li>
 </ul>
 <p>VTL Syntax changes:</p>
 <ul>


Reply via email to