The page collects contributed code and examples. Please feel free to add your own! You can place a link here to your own web site or put it directly on the wiki.
There are also numerous contributed code samples, macros, and templates on the VelocityTools wiki.
Application Code
- VelocityValidationToolHack – Struts 1.0 client side javascript for validation library (Struts 1.1 support is built into the VelocityTools project)
- Xkins - Skin framework using Velocity : website project
- VelocityMail – Leon Messerschmidt's code for rendering a template and sending via email
- EnhydraVelocity – A simple example of how Velocity can be used by Enhydra, by Dave Bryson.
Templates / Macros
- VelocityDebuggingTemplate – template that pops up a debugging console showing all the context vars
- VelocityCommaIfNeeded – Use a macro to make creating comma separated lists easy.
Editor / IDE add-ins
- Boxer_Text_Editor – a color syntax highlighting file for Velocity macros.
- EmacsVtlMode – Emacs minor mode to do Velocity syntax font coloring. Contributed by Brian Leonard.
- IntelliJTemplates – Velocity Live Templates for the IntelliJ IDE, written by Rickard Öberg.
- JEditTemplate
- UltraEdit – A 'WordFile.txt' addition for Ultraedit that hightlights Velocity keywords.
Custom Introspectors
- MultiUberspect – an Uberspector that can dispatch introspection tasks to custom Uberspectors on a per-class basis
- LuceneDocumentUberspect – An Uberspect for Lucene Documents that works with the above class
- JythonUberspect – An uberspect for handling Jython (Java Python) objects
- info] – An Uberspect for JRuby: [http://wiki.sprocket.slackworks.com/instiki/published/JRubyUberspect project
- WebappUberspector – an Uberspector which allows getting and setting of scoped attributes within a webapp: $session.bar, #set($application.bar,'foo'), $request.foo
Custom Directives
- XPath – XPath evaluating directive, by VladimirKirichenko
Custom Resource Loaders
- StructuredGlobbingResourceLoader – a structured whitespace globbing implementation - see VelocityWhitespaceGobbling
Other sample code / examples
- AnakiaWikiStyleSheet – Translates Anakia style sheets into Wiki documents
- DVSLExamples – how to use DVSL in a webapp
- PageList – A list wrapper that can be used to implement paging of long lists in Velocity
- StdErrLogSystem – An example logger that sends output to stderr. By Christopher Reck. See also org.apache.velocity.runtime.log.StandardOutLogChute for a similar example.
- XPath_Evaluation – XPath evaluating directive, by Erik Bengtson
- JpaResourceLoader – ResourceLoader that uses a JPA EntityManager and NamedQuery to retrieve templates with Spring configuration, by David Pedowitz