blob: f1f476cad3f2a2d408746b3ede8128807c900651 [file] [log] [blame]
<html>
<head>
<title>Velocity - Velocity Tools Changes</title>
<meta name="author" value="Nathan Bubna"/>
<meta name="email" value="nbubna@apache.org" />
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76"
alink="#525D76" vlink="#525D76">
<table border="0" width="100%" cellspacing="4">
<tr><td colspan="2">
<a href="http://velocity.apache.org/">
<img src="http://velocity.apache.org/images/velocity_project_wide.png"
align="left" alt="The Velocity Project" border="0"/>
</a>
<a href="index.html">
<img src="images/velocitytools.png" align="right" alt="< Velocity Tools >" border="0"/>
</a>
</td></tr>
<tr>
<td colspan="2">
<hr noshade="" size="1"/>
</td>
</tr>
<tr>
<td width="20%" valign="top" nowrap="true">
<p><strong><a href="http://velocity.apache.org/">Velocity</a></strong></p>
<p>
<strong>Velocity Tools</strong>
</p>
<ul>
<li><a href="index.html">Overview</a></li>
<li><a href="index.html#Download">Download</a></li>
<li><a href="changes.html">ChangeLog</a></li>
<li><a href="index.html#Subversion Repository">Subversion Repository</a></li>
<li><a href="javadoc/index.html">Javadoc</a></li>
<li><a href="http://wiki.apache.org/velocity/VelocityTools">Wiki</a></li>
<li><a href="http://wiki.apache.org/velocity/VelocityFAQ">FAQ</a></li>
<li><a href="http://issues.apache.org/jira/browse/VELTOOLS">Report Issues</a></li>
</ul>
<p>
<strong>Subprojects</strong>
</p>
<ul>
<li><a href="generic/">GenericTools</a></li>
<li><a href="view/">VelocityView</a></li>
<li><a href="struts/">VelocityStruts</a></li>
</ul>
</td>
<!-- RIGHT SIDE MAIN BODY -->
<td colspan="1" valign="top" align="left">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="Velocity Tools Changes">
<strong>Velocity Tools Changes</strong></a></font>
</td>
</tr>
<tr>
<td NOWRAP> &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td>
<p>This document tracks the changes in Velocity Tools between releases.</p>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="1.4">
<strong>1.4</strong></a></font>
</td>
</tr>
<tr>
<td NOWRAP> &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td>
<p>This section describes changes after the 1.3 release.</p>
<ul>
<li>Added ability to add current request parameters to LinkTool, including controls for automatically and/or manually ignoring some of those. Thanks to Christopher Schultz. (ndb)</li>
<li>VELTOOLS-87: fixed infinite recursion in RenderTool. Thanks to Andrea Bernardo Ciddio. (ndb)</li>
<li>Upgraded DVSL version used for documentation to v1.0 (ndb)</li>
<li>VELTOOLS-85: Fix order preservation problem in SortTool. Thanks to Tatyana. (ndb)</li>
<li>Protect BrowserSniffer from requests without user-agent. (cb)</li>
<li>Added support for a MethodExceptionHandler - the TilesTool.get() method now only returns null if one isn't present. (maj)</li>
<li>Changed StrutsLinkTool.setForward() to look for forwards local to the action mapping, before looking up global forwards. Thanks to Christopher Schultz. (ndb)</li>
<li>Rearrange/refactor/deprecate some internal methods in VelocityViewServlet in preparation for VelocityTools 2.0 upgrades. (ndb)</li>
<li>Upgraded Velocity Engine dependency to build and test against v1.5. (NOTE: Velocity Engine 1.5 will be required for VelocityTools 2.0.) (ndb)</li>
<li>Added propertyKey() and propertyValue() escaping support to EscapeTool (VELTOOLS-81). Thanks to Phil Cornelius for this patch. (ndb)</li>
<li>Fixed bug in request-path restriction when using wildcards. (ndb)</li>
<li>Make default locale and format for NumberTool configurable, just as they are in DateTool. (ndb)</li>
<li>Add ComparisonDateTool (with some tests and showcase demos) for comparing dates and displaying the comparisons textually. Thanks to Chris Townsen for the initial implementation. (ndb)</li>
<li>Add ability to configure default Locale for DateTool and to lock down configure() so it is safe to use in application scope. (ndb)</li>
<li>Add better support for dynamic locales in MessageTool. Thanks to Christopher Schultz. (ndb)</li>
<li>Use ResourceTool for common text throughout the Showcase example. (ndb)</li>
</ul>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="1.3">
<strong>1.3</strong></a></font>
</td>
</tr>
<tr>
<td NOWRAP> &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td>
<p>This section describes changes after the 1.2 release.</p>
<ul>
<li>Added ResourceTool and ViewResourceTool for access to and use of ResourceBundles. (ndb)</li>
<li>Upgraded to latest versions of Commons-Digester (1.8) and Commons-Validator (1.3.1). (ndb)</li>
<li>VELTOOLS-58: Updated ValidatorTool to mirror key changes/features in Struts 1.3.x's JavascriptValidatorTag. Thanks to Christopher Schultz and Niall Pemberton. (ndb)</li>
<li>VELTOOLS-73: Added url(String) method to EscapeTool for URL encoding. Thanks to Marc Novakowski for this. (cb)</li>
<li>Added start.showcase.webapp and stop.showcase.webapp ant targets to manually launch the showcase webapp using the embedded Jetty servlet container. (cb)</li>
<li>Added a testcases framework for generic and view tools. (cb)</li>
<li>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). (ndb)</li>
<li>Upgraded VelocityStruts dependencies to those for Struts 1.3.x series and updated "struts" example app according to <a href="http://wiki.apache.org/struts/StrutsUpgradeNotes12to13">provided directions</a>. (ndb)</li>
<li>Replaced "layout" example with new "showcase" example to interactively demonstrate all tools and the VelocityLayoutServlet. (ndb)</li>
<li>Added auto() and manual() methods to AlternatorTool and deprecated the make() methods that took a boolean parameter. (ndb)</li>
<li>Added getAll() method to ParameterParser to retrieve map of all params via <code>$params.all</code>. (ndb)</li>
<li>Added configurable getSelf() function to LinkTool to make self-referencing links easier. (ndb)</li>
<li>Added create() methods to CookieTool to support more complex Cookie creation. (ndb)</li>
<li>Added ContextTool for convenient access to context data and meta-data. (ndb)</li>
<li>VELTOOLS-71: 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. (ndb)</li>
<li>Updated license headers and notices to comply with new ASF policy. (henning)</li>
<li>Made auto-alternate default of AlternatorTool configurable via toolbox config. (ndb)</li>
<li>Add addQueryData(Map) and params(Map) method to LinkTool. Thanks to Mark Brunkhart for this. (ndb)</li>
<li>VELTOOLS-56: Fixed a number of problems with ImportSupport. Thanks to Christopher Schultz for this. (ndb)</li>
<li>VELTOOLS-67: Add ability to restrict availability of request-scoped tools according to a request path value set in the tool configuration. Thanks to Claude Brisson for this. (ndb)</li>
<li>VELTOOLS-68: Change VelocityViewServlet to read logger and resource loader config from velocity.properties file instead of hard-coding it. (henning)</li>
<li>Added setAbsolute() and absolute() methods to LinkTool. (ndb)</li>
<li>Made default format of DateTool configurable via toolbox definition. (ndb)</li>
<li>Deprecated ViewTool and Configurable interfaces. ViewToolInfo has been enhanced to automatically recognize such tools by checking for init(Object) and/or configure(Map) methods. (ndb)</li>
<li>Enhanced TextKey trick in MessageTool to make using args and bundles easier. (ndb)</li>
<li>Add getInteger() and getDouble() convenience methods to ValueParser. (ndb)</li>
<li>Added get() method to StrutsLinkTool to allow syntax like <code>$link.action.saveFoo</code>. (ndb)</li>
<li>Added param(), relative(), anchor(), and uri() convenience methods to LinkTool. (ndb)</li>
<li>Added currency(), number(), integer(), and percent() convenience methods to NumberTool. (ndb)</li>
<li>Changed auto-alternate default in AlternatorTool to match Alternator default.</li>
</ul>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="1.2">
<strong>1.2</strong></a></font>
</td>
</tr>
<tr>
<td NOWRAP> &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td>
<p>This section describes changes after the 1.1 release.</p>
<ul>
<li>Updated documentation to cover new features and sync to many infrastructure changes. (ndb)</li>
<li>Fixed incomplete escaping in ValidatorTool (patch from Christopher Schultz. Jira Issue VELTOOLS-52). (ndb)</li>
<li>Fixed infinite loop logging problem with Tomcat 5.5 in the "simple" example webapp. (ndb)</li>
<li>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. (ndb)</li>
<li>Added VelocityStruts support for non-resource and session-scoped action messages (patch and help from Niall Pemberton. See Jira issues VELTOOLS-1 and VELTOOLS-51). (ndb)</li>
<li>Factored generic parsing code out of ParameterParser into new ValueParser for parsing strings pulled from any Map. (ndb)</li>
<li>Improved error handling/recovery in toolbox xml parsing by adding validation of tool info. (henning)</li>
<li>Added BrowserSnifferTool for identifying browsers and their features (contributed by Claude Brisson). This
depends on Java 1.4's regexp support for use. (ndb)</li>
<li>Added EscapeTool for commons escaping needs (contributed by Shinobu Kawai). This requires commons-lang for use. (ndb)</li>
<li>Added ListTool as utility for using arrays like Lists in templates (contributed by Shinobu Kawai). (ndb)</li>
<li>Added DateTool methods to provide easy access to date values (e.g. month, year, day). (ndb)</li>
<li>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. (ndb)</li>
<li>Fixed bad relative URIs in LinkTool when webapp is installed as root (#32104, reported by Laurent Dauvilaire). (ndb)</li>
<li>Factored basic pagination code out of AbstractSearchTool into new AbstractPagerTool. (ndb)</li>
<li>Make StrutsUtils.errorMarkup() support errors.prefix/suffix (#31768, patch by Shinobu Kawai). (ndb)</li>
<li>Fixed ImportSupport bug with multiple calls to ImportResponseWrapper.getWriter() or getOutputStream() (#32146, patch by Shinobu Kawai). (ndb)</li>
<li>Made DateTool.toDate(Object) accept Number in place of Long. (ndb)</li>
<li>Fixed RenderTool NPE when passed null VTL string (#31583, reported by Tim Colson). (ndb)</li>
<li>Enable template cache refreshing and global macro autoreloading in WebappLoader. (maj)</li>
<li>Stopped using Velocity's dependency jar. (maj)</li>
<li>Upgraded Struts, commons-collections, commons-logging, and commons-validator to Struts 1.2.4 versions. (maj)</li>
<li>Added new SortTool (based on contribution from Brett Sutton). (ndb)</li>
<li>Added MathTool methods for totalling or averaging lists or arrays of values (adapted from a contribution by Leon Messerschmidt). (ndb)</li>
<li>Prevent NPE in RenderTool.recurse() when an evaluation fails. (ndb)</li>
<li>Upgraded jars from Velocity 1.3.1 to Velocity 1.4 (ndb)</li>
<li>Simplified MessageTool interface to support $text.this.that syntax instead of just $text.get('this.that') (ndb)</li>
<li>Added Alternator and AlternatorTool to improve on the old VelocityFormatter.makeAutoAlternator(). (ndb/dlr)</li>
<li>Added new Configurable interface and support for configuring tools in the toolbox definition. (ndb)</li>
<li>Added methods for integer division and modulus to MathTool. (ndb)</li>
<li>Remove members, methods, and classes deprecated in 1.1. (ndb)</li>
<li>Bring example Struts apps up to speed with latest Struts version. (maj)</li>
<li>Upgrade jars to Struts 1.2.0 and Validator 1.1.2. (maj)</li>
</ul>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="1.1">
<strong>1.1</strong></a></font>
</td>
</tr>
<tr>
<td NOWRAP> &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td>
<p>This section describes changes after the 1.1-rc1 release.</p>
<ul>
<li>Deprecated StrutsUtils' getActionErrors() and getActionMessages() in favor of getErrors() and getMessages(). (ndb)</li>
<li>Fixed javadoc warnings during build (patch contributed by Nathan Green). (ndb)</li>
<li>Some sort of improvements to Struts example apps. (maj)</li>
</ul>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="1.1-rc1">
<strong>1.1-rc1</strong></a></font>
</td>
</tr>
<tr>
<td NOWRAP> &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td>
<p>This section describes changes after the 1.1-beta release.</p>
<ul>
<li>Changed recommended keys for MessageTool and ActionMessagesTool to $text and $messages. (ndb)</li>
<li>Changed XMLToolboxManager to use thread context classloader when digesting toolbox. (ndb)</li>
<li>Fixed session tool initialization/synchronization issue. (ndb)</li>
<li>Added TilesTool methods to import attributes to specific scopes (page/request/session/application). (maj)</li>
<li>Added new demos for using ValidatorTool, TilesTool, and SecureLinkTool to VelocityStruts example app. (maj)</li>
<li>Upgraded/refactored MathTool to add floor() and ceil(), make type-handling more intuitive and flexible, and improve number parsing. (ndb)</li>
<li>Improved resource bundle support in ActionMessagesTool. (ndb)</li>
<li>ErrorsTool now extends ActionMessagesTool. (ndb)</li>
<li>LinkTool now encodes URLs using the response's character encoding. (ndb)</li>
<li>Removed inadvertant JDK 1.4 dependencies from ImportSupport. (ndb)</li>
<li>Made XMLToolboxManager not abstract (#24840). (ndb)</li>
<li>De-staticized non-private methods in RenderTool and LinkTool. (ndb)</li>
<li>Added NumberTool for formatting numbers (contributed by Mike Kienenberger). (ndb)</li>
<li>Filled out and cleaned up DateTool's toDate(...) methods. (ndb)</li>
<li>Changed VelocityViewServlet's error method to print the stack trace of the root cause when it encounters a MethodInvocationException. (ndb)</li>
<li>Added importAttributes() method to TilesTool to automatically put all attributes of the current Tiles context into the Velocity context. (maj)</li>
<li>Replaced TilesTool's getString(String) method with getAttribute(String) in order to support "put lists." (maj)</li>
</ul>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="1.1-beta1">
<strong>1.1-beta1</strong></a></font>
</td>
</tr>
<tr>
<td NOWRAP> &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td>
<p>This section describes changes after the 1.0 release.</p>
<ul>
<li>Made VelocityViewServlet use response.getOutputStream() if response.getWriter() fails. This is functionality is deprecated and provided as a migration path from 1.0 behavior. (dlr, ndb)</li>
<li>De-staticized MathTool to make it extendable. (ndb)</li>
<li>Factored common functionality of ErrorsTool, MessageTool, and ActionMessagesTool into abstract MessageResourcesTool. (ndb)</li>
<li>Added ImportTool as a simple ImportSupport-based tool. (maj)</li>
<li>Converted TilesTool to extend ImportSupport. This allows easy mixing of view technologies (JSP, Velocity, etc.) in VelocityStruts applications. (thanks go to Matthew Payne for the idea!) (maj)</li>
<li>Added ImportSupport class for building tools that can import resources from local or remote URLS. (maj)</li>
<li>Overhauled DateTool to make it more extendable, user-friendly, and add support for standard, localized date-time styles (see DateTool javadoc for more). (ndb)</li>
<li>Added support for specifying message resource bundles to StrutsUtils, ErrorsTool, ActionMessagesTool, and MessageTool. (maj,ndb)</li>
<li>Added commons-validator (1.0.2) and sslext jars to library. (maj)</li>
<li>Added SecureLinkTool for using Struts SSL Extension with VelocityStruts. (maj)</li>
<li>Added ValidatorTool to provide Struts 1.1 javascript validation for VelocityStruts. (maj)</li>
<li>output.encoding property (if non-default) is appended to default content-type as the charset. (ndb)</li>
<li>VelocityViewServlet now uses response.getWriter() instead of response.getOutputStream() as suggested by Matthew Payne. (ndb)</li>
<li>Improved VelocityViewServlet error handling (exceptions are logged and error() is now more robust). (ndb)</li>
<li>Put VelocityViewServlet's requestCleanup() call in a 'finally' clause to allow clean after errors during a request. (dlr)</li>
<li>Fixed miscellaneous javadoc and doc typos (many of which were reported by Takayoshi Kimura) (ndb)</li>
<li>Allow system to reclaim objects held by pooled writers in VelocityViewServlet (see bug 18951) (ndb)</li>
<li>Changed LinkTool to automatically check for XHTML setting (ndb)</li>
<li>Added support for standard XHTML mode setting via toolbox config (ndb)</li>
<li>Moved request/response/session/application keys to ViewContext and add getAttribute() method (ndb)</li>
<li>Added selectModule() and getForwardURL() to StrutsUtils (maj)</li>
<li>Convert VelocityStruts tools to use new StrutsUtils methods and be module aware (maj)</li>
<li>Removed unused imports from StrutsLinkTool (ndb)</li>
<li>Refactor StrutsUtils to use Struts 1.1 classes and support modules (maj)</li>
<li>Added TilesTool (maj)</li>
<li>Allow subclasses of VelocityViewServlet to use different ToolboxManager implementations (ndb)</li>
<li>Added CookieTool (contributed by Dmitri Colebatch) (ndb)</li>
<li>Added demo of &lt;data&gt; elements to simple VelocityView example (ndb)</li>
<li>Made simple VelocityStruts example catch Commons-Logging output with LogSystemCommonsLog (ndb)</li>
<li>Convert toolbox setup to use Digester instead of dom4j (ndb)</li>
<li>Added LogSystemCommonsLog and CommonsLogLogSystem to provide bridges between Commons-Logging and Velocity's LogSystem (ndb)</li>
<li>Added Commons Logging 1.0.3 jar (ndb)</li>
<li>Added ActionMessagesTool (ndb)</li>
<li>Upgrade deprecated Struts 1.0 uses in examples (ndb)</li>
<li>Updated jars to Struts 1.1, BeanUtils 1.6.1, Digester 1.5, Collections 2.1 (ndb)</li>
</ul>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="1.0">
<strong>1.0</strong></a></font>
</td>
</tr>
<tr>
<td NOWRAP> &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td>
<ul>
<li>Initial release.</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!-- FOOTER SEPARATOR -->
<tr>
<td colspan="2">
<hr noshade="" size="1"/>
</td>
</tr>
<!-- PAGE FOOTER -->
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 1999-2003, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
</body>
</html>