The Velocity Project < Velocity Tools >


Velocity Tools



VelocityTools is a collection of Velocity subprojects with a common goal of creating tools and infrastructure for building both web and non-web applications using the Velocity template engine.


GenericTools is a group of reuseable and documented tools that can be added to a Velocity context. A tool is simply a class which can perform various tasks when made available to the Velocity engine. Most tools are optimized for use with an automatically managed toolbox (see VelocityViewServlet).


VelocityView contains a standalone servlet (VelocityViewServlet) which can render templates for web applications.

Also included is a Toolbox Manager which can automatically make "view tools" and data available to the templates. Any class with public methods can be used as a tool in the template.

VelocityLayoutServlet is an extension of the basic VelocityViewServlet that can render screen content into common layout templates.


VelocityStruts is a set of tools for using the Velocity template engine as the view layer for a web application built upon the Apache Struts framework.

This work leverages the VelocityViewServlet and additional tools which make it easy to integrate the Velocity with Struts. Several example hybrid applications are included.

Example Applications

Several example applications are currently available, including one to demonstrate the use of Velocity as a view technology for Struts. The example utilizes both Velocity and JSP files for the view in parallel so that they can be compared easily. Also, resources bundle usage for language localization is demonstrated there. Other examples include a demonstration of the use of the VelocityLayoutServlet and a minimal "simple" application.


Emphasis is was being put on providing tool documentation that is suitable for template designers. To achive this goal, a documentation format has been defined that captures all information relevant to the template designer. It is being supplied in addition to the customary Javadoc. This should help to achieve what we always claim for Velocity: "Decouple the work of template designers from the work of software developers". Look at the Struts MessageTool for a good example of the new documentation format.

Update: While we value the look and readability of this format, we are presently drifting away from the use of it. The primary reason for this is that the developers have found it difficult to maintain (i.e. no one has been motivated enough to put in the extra work). If you feel this documentation format is valuable and wish to help us create and maintain it for the various individual tools, please see below for more details on getting involved. Meanwhile, we'll be putting effort into improving javadoc for individual tools and overview documents for the sub-projects.



The latest versions are available for download in source or binary form.

Subversion Repository

All VelocityTools project code is maintained in the Subversion repository

Web Browser:

Subversion Client:

Wanna help?

We encourage interested developers to evaluate the project and send feedback to the velocity-user or velocity-dev mailing list.

Those interested in furthering the development of this project are especially welcome to jump in and help out. Patches can be sent to the mailing list or attached to a JIRA issue. The Wiki can also be a good place to discuss and develop ideas.

A few good places to get started include:

  • Documentation (patches for the site or additions to the Wiki)
  • Improving the example apps
  • Contributing to the VelocimacroLibrary
Other project goals and proposals can be found in the project STATUS file.

Copyright © 1999-2003, Apache Software Foundation