<?xml version="1.0"?>

<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-->

<document>
  <properties>
    <title>Change Log</title>
    <projectfile>xdocs/project.xml</projectfile>
  </properties>
<body>
  <section name="VelocityTools Changes">
    <p>This document tracks the changes in VelocityTools between releases.</p>

    <subsection name="2.0">
        <p>This section very briefly and generally describes changes after the 1.x series.</p>
        <ul>
        <li>More convention over configuration and smart defaults (ndb)</li>
        <li>New configuration formats (more concise/flexible/powerful xml, properties, java) (ndb)</li>
        <li>Entirely new core infrastructure (lazy-loading tools, easier access, standalone support etc) (ndb)</li>
        <li>Added VelocityViewTag for JSP integration (ndb)</li>
        <li>Added DisplayTool, ConversionTool, ClassTool, LoopTool, FieldTool, a generic version of LinkTool and more (ndb)</li>
        <li>Refactored and enhanced a number of existing tools (ndb)</li>
        <li>Improved documentation (ndb)</li>
        <li>Deprecated many outdated things (ndb)</li> -->
        <li>Legacy support for almost all Tools 1.4 configurations and extensions (ndb)</li>
        <li>Better integration of $application, $session and $request scope control objects (cbn)</li>
	    <li>and lots more...</li>
        </ul>
    </subsection>

    <subsection name="1.4">
        <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>
    </subsection>

    <subsection name="1.3">
        <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>
    </subsection>

    <subsection name="1.2">
      <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>
    </subsection>

    <subsection name="1.1">
      <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>
    </subsection>

    <subsection name="1.1-rc1">
      <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>
    </subsection>

    <subsection name="1.1-beta1">
      <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>
    </subsection>

    <subsection name="1.0">
      <ul>
      <li>Initial release.</li>
      </ul>
    </subsection>

  </section>

</body>
</document>
