Velocity Tools

Subprojects

Docs

Development

Velocity News Feed

Changes Report

Release History

Version Date Description
3.1 2021-02-27
3.0 2018-10-01
2.0 2010-05-10
1.4 2007-11-26
1.3 2007-02-08
1.2 2005-11-09
1.1 2004-02-21
1.1-rc1 2004-02-21
1.1-beta1 2003-11-10
1.0 2003-07-16

Release 3.1 - 2021-02-27

Type Changes By
Fix potential XSS vulterability in VelocityViewServlet error handling. Jackson Henry
Added Travis CI. Thanks to mgrigorov. cbrisson
Added an `exact` mode to ComparisonDateTool (which uses an actual dates/months difference rather than a global milliseconds difference) cbrisson
Added a new BreadcrumbTool meant to help displaying UI breadcrumb trails cbrisson
Added an optional 'factory' attribute to tools with the classname of a factory for creating new tools instances cbrisson

Release 3.0 - 2018-10-01

Type Changes By
upgraded to servlet API 3.1.0 michaelo
JsonTool now uses an explicit dependency to com.github.cliftonlabs.json-simple Fixes VELTOOLS-179. michaelo
The tools.xml file can now use XInclude file inclusion mechanism Fixes VELTOOLS-162. cbrisson
Most tools are now serializable Fixes VELTOOLS-161. cbrisson
CollectionTool.sort() now filters out null elements cbrisson
ViewLayoutServlet layout cannot be changed using GET parameters, unless configured with the tools.view.servlet.layout.dynamic servlet param to true cbrisson
Review tools-view initialization: default tools are now loaded only when asked for via the org.apache.velocity.tools.loadDefaults parameter (as an init or servlet parameter). cbrisson
Drop undocumented autoloaded tools feature, and have org.apache.velocity.tools.loadDefaults default to false cbrisson
Make tools-view initialization much pickier about file accesses, to ease the use of a Java SecurityManager cbrisson
Fixed BrowserTool Accept-Language header parsing cbrisson
Added new $conv.toList(obj) method cbrisson
Added $browser.IPAddress cbrisson
Removed deprecated components velocity-tools-uberjar and velocity-tools-assembly cbrisson
ImportTool reenginering:
  • the ImportSupport utility class has been splitted between o.a.v.generic.ImportSupport and o.a.v.view.ViewImportSupport
  • the ImportTool now has a generic version (for remote URLs import) and a view version (for local URLs import) which cannot use remote URLs in safe mode
  • the local URLs import respects the 3.1 servlets specification: query parameters of the included URL do overwrite original ones
cbrisson
XmlTool now uses the standard JRE XML parser instead of the org.jdom API ; it is now in two flavors, the generic tools one and the view tools one. The view tools flavor allows the parsing of http query xml post data. cbrisson
Added a new JsonTool for parsing json. It is in two flavors, the generic tools one and the view tools one. The view tools flavor allows the parsing of http query json post data. cbrisson
Added an EscapeTool.unurl(String) unescaping method cbrisson
Deprecated ConversionTool: date/time parsing and formatting methods belong to DateTool, while number parsing and formatting methods belong to NumberTool ; toLocale() method is now in LocaleConfig cbrisson
Deprecated SortTool, and added a CollectionTool to gather lists sorting/splitting methods cbrisson
Deprecated MathTool number parsing methods, which are redundant with NumberTool ones cbrisson
Deprecated AlternateTool cbrisson
DateTool reenginering:
  • added iso and iso_tz date/datetime standard formats
  • added intl and intl_tz for human-readable international format (time zone displayed by id)
cbrisson
use static logging in Tools classes cbrisson
new generic LogTool to emit logs from inside templates cbrisson
drop unmaintained Struts tools cbrisson
full review of BrowserTool implementation, update user-agents detection algorithm cbrisson
Removed deprecated 1.x configuration handling and depreacted 1.x tools initialization support cbrisson
Switched engine dependency to 2.0 cbrisson
Replace all uses of commons-collections ExtendedProperties class by org.apache.velocity.util.ExtProperties cbrisson
Removed deprecated class org.apache.velocity.tools.generic.log.LogSystemCommonsLog cbrisson
MathTool: added bitwise operations cbrisson
fixed result type calculations cbrisson
Switched log system facade to SLF4j cbrisson
Upgraded to JUnit 4.12, commons-beanutils 1.9.3, commons-digester 3.2, and Velocity Engine 2.0. cbrisson
Fixes VELTOOLS-129. Thanks to Michael Osipov. nbubna
fix sync problems Fixes VELTOOLS-128. nbubna
correct handling and better reporting of commited responses in error() cbrisson
Added a custom number formats cache in ConversionUtils cbrisson
added localization of DateFormat format strings Fixes VELTOOLS-144. schultz
fixed a LinkTool bug with parametersToIgnore management Fixes VELTOOLS-148. schultz
changed LinkTool.addRequestParams to accept Object[] Fixes VELTOOLS-149. schultz
$link.absolute($uri) should not encode query strings in the argument Fixes VELTOOLS-146. schultz
ValidatorTool generates invalid XHTML even when in XHTML mode Fixes VELTOOLS-152. schultz

Release 2.0 - 2010-05-10

Type Changes By
More convention over configuration and smart defaults nbubna
New configuration formats (more concise/flexible/powerful xml, properties, java) nbubna
Entirely new core infrastructure (lazy-loading tools, easier access, standalone support etc) nbubna
Added VelocityViewTag for JSP integration nbubna
Added DisplayTool, ConversionTool, ClassTool, LoopTool, FieldTool, a generic version of LinkTool and more nbubna
Refactored and enhanced a number of existing tools nbubna
Improved documentation nbubna
Deprecated many outdated things nbubna
Legacy support for almost all Tools 1.4 configurations and extensions nbubna
Better integration of $application, $session and $request scope control objects cbrisson

Release 1.4 - 2007-11-26

Type Changes By
Added ability to add current request parameters to LinkTool, including controls for automatically and/or manually ignoring some of those Thanks to Christopher Schultz. nbubna
fixed infinite recursion in RenderTool Fixes VELTOOLS-87. Thanks to Andrea Bernardo Ciddio. nbubna
Upgraded DVSL version used for documentation to v1.0 nbubna
Fix order preservation problem in SortTool Fixes VELTOOLS-85. Thanks to Tatyana. nbubna
Protect BrowserSniffer from requests without user-agent cbrisson
Added support for a MethodExceptionHandler - the TilesTool.get() method now only returns null if one isn't present marino
Changed StrutsLinkTool.setForward() to look for forwards local to the action mapping, before looking up global forwards Thanks to Christopher Schultz. nbubna
Rearrange/refactor/deprecate some internal methods in VelocityViewServlet in preparation for VelocityTools 2.0 upgrades nbubna
Upgraded Velocity Engine dependency to build and test against v1.5 (NOTE: Velocity Engine 1.5 will be required for VelocityTools 2.0.) nbubna
Added propertyKey() and propertyValue() escaping support to EscapeTool Fixes VELTOOLS-81. Thanks to Phil Cornelius. nbubna
Fixed bug in request-path restriction when using wildcards nbubna
Make default locale and format for NumberTool configurable, just as they are in DateTool nbubna
Add ComparisonDateTool (with some tests and showcase demos) for comparing dates and displaying the comparisons textually Thanks to Chris Townsen. nbubna
Add ability to configure default Locale for DateTool and to lock down configure() so it is safe to use in application scope nbubna
Add better support for dynamic locales in MessageTool Thanks to Christopher Schultz. nbubna
Use ResourceTool for common text throughout the Showcase example nbubna

Release 1.3 - 2007-02-08

Type Changes By
Added ResourceTool and ViewResourceTool for access to and use of ResourceBundles nbubna
Upgraded to latest versions of Commons-Digester (1.8) and Commons-Validator (1.3.1) nbubna
Updated ValidatorTool to mirror key changes/features in Struts 1.3.x's JavascriptValidatorTag Fixes VELTOOLS-58. Thanks to Christopher Schultz and Niall Pemberton. nbubna
Added url(String) method to EscapeTool for URL encoding Fixes VELTOOLS-73. Thanks to Marc Novakowski. cbrisson
Added start.showcase.webapp and stop.showcase.webapp ant targets to manually launch the showcase webapp using the embedded Jetty servlet container cbrisson
Added a testcases framework for generic and view tools cbrisson
Changed VelocityViewServlet to look for toolbox config at "/WEB-INF/toolbox.xml" and velocity init properties at "/WEB-INF/velocity.properties" when no other locations are specified (i.e. change the standard location into a convention to reduce configuration needs) nbubna
Upgraded VelocityStruts dependencies to those for Struts 1.3.x series and updated "struts" example app according to provided directions nbubna
Replaced "layout" example with new "showcase" example to interactively demonstrate all tools and the VelocityLayoutServlet nbubna
Added auto() and manual() methods to AlternatorTool and deprecated the make() methods that took a boolean parameter nbubna
Added getAll() method to ParameterParser to retrieve map of all params via $params.all nbubna
Added configurable getSelf() function to LinkTool to make self-referencing links easier nbubna
Added create() methods to CookieTool to support more complex Cookie creation nbubna
Added ContextTool for convenient access to context data and meta-data nbubna
Overhauled ant build process: dependencies are now automatically download, jars have manifests, checksums are auto-generated, and more. Also, building with JDK 1.3 is no longer supported Fixes VELTOOLS-71. nbubna
Updated license headers and notices to comply with new ASF policy henning
Made auto-alternate default of AlternatorTool configurable via toolbox config nbubna
Add addQueryData(Map) and params(Map) method to LinkTool Thanks to Mark Brunkhart. nbubna
Fixed a number of problems with ImportSupport Fixes VELTOOLS-56. Thanks to Christopher Schultz. nbubna
Add ability to restrict availability of request-scoped tools according to a request path value set in the tool configuration Fixes VELTOOLS-67. Thanks to Claude Brisson. nbubna
Change VelocityViewServlet to read logger and resource loader config from velocity.properties file instead of hard-coding it Fixes VELTOOLS-68. henning
Added setAbsolute() and absolute() methods to LinkTool nbubna
Made default format of DateTool configurable via toolbox definition nbubna
Deprecated ViewTool and Configurable interfaces ; ViewToolInfo has been enhanced to automatically recognize such tools by checking for init(Object) and/or configure(Map) methods nbubna
Enhanced TextKey trick in MessageTool to make using args and bundles easier nbubna
Add getInteger() and getDouble() convenience methods to ValueParser nbubna
Added get() method to StrutsLinkTool to allow syntax like $link.action.saveFoo nbubna
Added param(), relative(), anchor(), and uri() convenience methods to LinkTool nbubna
Added currency(), number(), integer(), and percent() convenience methods to NumberTool nbubna
Changed auto-alternate default in AlternatorTool to match Alternator default nbubna

Release 1.2 - 2005-11-09

Type Changes By
Updated documentation to cover new features and sync to many infrastructure changes nbubna
Fixed incomplete escaping in ValidatorTool Fixes VELTOOLS-52. Thanks to Christopher Schultz. nbubna
Fixed infinite loop logging problem with Tomcat 5.5 in the "simple" example webapp nbubna
Upgraded jars to Struts 1.2.7, Commons-Logging 1.0.4, Commons-Validator 1.1.4, Digester 1.7, Commons-Collections 3.1, Beanutils 1.7.0, Struts SSL Extension for 1.2, and Commons-Lang 2.1 nbubna
Added VelocityStruts support for non-resource and session-scoped action messages Fixes VELTOOLS-51. Thanks to Niall Pemberton. nbubna
Factored generic parsing code out of ParameterParser into new ValueParser for parsing strings pulled from any Map nbubna
Improved error handling/recovery in toolbox xml parsing by adding validation of tool info henning
Added BrowserSnifferTool for identifying browsers and their features ; this depends on Java 1.4's regexp support for use nbubna
Added EscapeTool for commons escaping needs ; this requires commons-lang for use Thanks to Shinobu Kawai. nbubna
Added ListTool as utility for using arrays like Lists in templates Thanks to Shinobu Kawai. nbubna
Added DateTool methods to provide easy access to date values (e.g. month, year, day) nbubna
Converted VelocityView and VelocityStruts to use a VelocityEngine instead of the Velocity singleton. This means only the servlets log directly to the VelocityEngine instance; the tools and other classes now use commons-logging (which can still be redirected to the VVS's VelocityEngine). Also, both the RenderTool and LogSystemCommonsLog now support either the singleton or non-singleton approach nbubna
Fixed bad relative URIs in LinkTool when webapp is installed as root Thanks to Laurent Dauvilaire. nbubna
Factored basic pagination code out of AbstractSearchTool into new AbstractPagerTool nbubna
Make StrutsUtils.errorMarkup() support errors.prefix/suffix Thanks to Shinobu Kawai. nbubna
Fixed ImportSupport bug with multiple calls to ImportResponseWrapper.getWriter() or getOutputStream() Thanks to Shinobu Kawai. nbubna
Made DateTool.toDate(Object) accept Number in place of Long nbubna
Fixed RenderTool NPE when passed null VTL string Thanks to Tim Colson. nbubna
Enable template cache refreshing and global macro autoreloading in WebappLoader marino
Stopped using Velocity's dependency jar marino
Upgraded Struts, commons-collections, commons-logging, and commons-validator to Struts 1.2.4 versions marino
Added new SortTool Thanks to Brett Sutton. nbubna
Added MathTool methods for totalling or averaging lists or arrays of values Thanks to Leon Messerschmidt. nbubna
Prevent NPE in RenderTool.recurse() when an evaluation fails nbubna
Upgraded jars from Velocity 1.3.1 to Velocity 1.4 nbubna
Simplified MessageTool interface to support $text.this.that syntax instead of just $text.get('this.that') nbubna
Added Alternator and AlternatorTool to improve on the old VelocityFormatter.makeAutoAlternator() Thanks to Daniel Rall. nbubna
Added new Configurable interface and support for configuring tools in the toolbox definition nbubna
Added methods for integer division and modulus to MathTool nbubna
Remove members, methods, and classes deprecated in 1.1 nbubna
Bring example Struts apps up to speed with latest Struts version marino
Upgrade jars to Struts 1.2.0 and Validator 1.1.2 marino

Release 1.1 - 2004-02-21

Type Changes By
Deprecated StrutsUtils' getActionErrors() and getActionMessages() in favor of getErrors() and getMessages() nbubna
Fixed javadoc warnings during build Thanks to Nathan Green. nbubna
Some sort of improvements to Struts example apps marino

Release 1.1-rc1 - 2004-02-21

Type Changes By
Changed recommended keys for MessageTool and ActionMessagesTool to $text and $messages nbubna
Changed XMLToolboxManager to use thread context classloader when digesting toolbox nbubna
Fixed session tool initialization/synchronization issue nbubna
Added TilesTool methods to import attributes to specific scopes (page/request/session/application) marino
Added new demos for using ValidatorTool, TilesTool, and SecureLinkTool to VelocityStruts example app marino
Upgraded/refactored MathTool to add floor() and ceil(), make type-handling more intuitive and flexible, and improve number parsing nbubna
Improved resource bundle support in ActionMessagesTool nbubna
ErrorsTool now extends ActionMessagesTool nbubna
LinkTool now encodes URLs using the response's character encoding nbubna
Removed inadvertant JDK 1.4 dependencies from ImportSupport nbubna
Made XMLToolboxManager not abstract nbubna
De-staticized non-private methods in RenderTool and LinkTool nbubna
Added NumberTool for formatting numbers Thanks to Mike Kienenberger. nbubna
Filled out and cleaned up DateTool's toDate(...) methods nbubna
Changed VelocityViewServlet's error method to print the stack trace of the root cause when it encounters a MethodInvocationException nbubna
Added importAttributes() method to TilesTool to automatically put all attributes of the current Tiles context into the Velocity context marino
Replaced TilesTool's getString(String) method with getAttribute(String) in order to support "put lists." marino

Release 1.1-beta1 - 2003-11-10

Type Changes By
Made VelocityViewServlet use response.getOutputStream() if response.getWriter() fails. This is functionality is deprecated and provided as a migration path from 1.0 behavior Thanks to Daniel Rall. nbubna
De-staticized MathTool to make it extendable nbubna
Factored common functionality of ErrorsTool, MessageTool, and ActionMessagesTool into abstract MessageResourcesTool nbubna
Added ImportTool as a simple ImportSupport-based tool marino
Converted TilesTool to extend ImportSupport. This allows easy mixing of view technologies (JSP, Velocity, etc.) in VelocityStruts applications Thanks to Matthew Payne. marino
Added ImportSupport class for building tools that can import resources from local or remote URLS marino
Overhauled DateTool to make it more extendable, user-friendly, and add support for standard, localized date-time styles (see DateTool javadoc for more) nbubna
Added support for specifying message resource bundles to StrutsUtils, ErrorsTool, ActionMessagesTool, and MessageTool Thanks to Marinó A. Jónsson. nbubna
Added commons-validator (1.0.2) and sslext jars to library marino
Added SecureLinkTool for using Struts SSL Extension with VelocityStruts marino
Added ValidatorTool to provide Struts 1.1 javascript validation for VelocityStruts marino
output.encoding property (if non-default) is appended to default content-type as the charset nbubna
VelocityViewServlet now uses response.getWriter() instead of response.getOutputStream() Thanks to Matthew Payne. nbubna
Improved VelocityViewServlet error handling (exceptions are logged and error() is now more robust) nbubna
Put VelocityViewServlet's requestCleanup() call in a 'finally' clause to allow clean after errors during a request nbubna
Fixed miscellaneous javadoc and doc typos Thanks to Takayoshi Kimura. nbubna
Allow system to reclaim objects held by pooled writers in VelocityViewServlet nbubna
Changed LinkTool to automatically check for XHTML setting nbubna
Added support for standard XHTML mode setting via toolbox config nbubna
Moved request/response/session/application keys to ViewContext and add getAttribute() method nbubna
Added selectModule() and getForwardURL() to StrutsUtils marino
Convert VelocityStruts tools to use new StrutsUtils methods and be module aware marino
Removed unused imports from StrutsLinkTool nbubna
Refactor StrutsUtils to use Struts 1.1 classes and support modules marino
Added TilesTool marino
Allow subclasses of VelocityViewServlet to use different ToolboxManager implementations nbubna
Added CookieTool Thanks to Dmitri Colebatch. nbubna
Added demo of <data> elements to simple VelocityView example nbubna
Made simple VelocityStruts example catch Commons-Logging output with LogSystemCommonsLog nbubna
Convert toolbox setup to use Digester instead of dom4j nbubna
Added LogSystemCommonsLog and CommonsLogLogSystem to provide bridges between Commons-Logging and Velocity's LogSystem nbubna
Added Commons Logging 1.0.3 jar nbubna
Added ActionMessagesTool nbubna
Upgrade deprecated Struts 1.0 uses in examples nbubna
Updated jars to Struts 1.1, BeanUtils 1.6.1, Digester 1.5, Collections 2.1 nbubna

Release 1.0 - 2003-07-16

Type Changes By
Initial release. nbubna