velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <>
Subject [ANNOUNCE] Apache Velocity 1.6
Date Wed, 03 Dec 2008 06:04:03 GMT
The Apache Velocity Team announces the immediate availability of the
of Apache Velocity Engine 1.6.  This release is fully compatible with
the previous release and includes significant improvements in
performance, stability and features.

Apache Velocity is well-known in the Java field as a lightweight,
easy-to-use templating library for creating dynamic web sites and
performing other text-generation tasks.

Much work in this release has gone to making significant improvements
in the memory usage and speed of Velocity.  Apart from this, a number
of small parser bugs were fixed, tempate/line/column information in
error messages has been corrected and made consistent, and many new
features were added.  Many of the latter are listed below:

* There are three new directives:
  - #evaluate takes a single string of VTL as an argument and renders it.
  - #define is a cousin of #macro, that lets define a reference that
represents the body of the directive, which is then evaluated when the
reference is used.
  - #break lets you exit a #foreach loop early.

* There are reflection improvements:
   - You may now call JDK 1.5 vararg methods on your tools and other
references with variable arguments.
   - You can put a static utility class directly into the context and
be able to call its methods; no instance necessary. (e.g.
context.put("Math", java.util.Math.class))
   - If you have a reference that is an array, you can now call
fixed-length list methods on it. (e.g. $array.size() and
$array.get($index) )
   - There is now support for chaining and linking Uberspect
implementations to simplify custom introspection.

* The underlying Velocimacro code has been refactored to allow:
  - Much, much better performance than Velocity 1.5
  - #parse( 'mymacros.vm' ) to work as expected!!
  - macro libraries to be programatically included when calling
  - users to configure a velocimacro.max.depth property (to limit
recursion et al)

* CommonsLogLogChute and ServletLogChute are now available without
including VelocityTools

* The StringResourceLoader has undergone major refactoring to make it
much more user-friendly and flexible.

* There is now an automatic $velocityHasNext reference in #foreach loops

* You can now configure the connection timeout for URLResourceLoader
(JDK 1.5+ only)

Documentation Velocity 1.6 can be found here:

The change log is here:

Apache Velocity 1.6 can be downloaded here:

For the Apache Velocity Team
   Nathan Bubna

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message