This page contains the slides and code from the 2004 ApacheCon session "Hacking Velocity". (March 17, 2004).
Velocity, the popular Jakarta templating language, can be used "out of the box" to produce dynamic HTML, generate code, and for a variety of other purposes. But what if you want to customize the Velocity language or environment? This session provides tips for the intermediate to advanced Velocity developer on how to provide additional functionality to your Velocity users. The following topics will be covered. All of these enhancements can be down without recompiling the Velocity jar files.
- Increasing developer productivity with the Velocity-Tools subproject
- Adding new template control statements with a custom directive
- Changing functionality with an event handler
- Loading your templates with a custom resourceloader
- Creating a secure Velocity hosting service with a custom introspector
If time allows, we'll discuss how to change the language syntax itself by using JavaCC and recompiling Velocity.
- Powerpoint slides from talk - hackingvelocity.ppt
- Java code and buildfiles for examples - samplecode.zip
Questions or Comments?
Contact Will Glass-Husain, firstname.lastname@example.org