cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McKibben <>
Subject [Patch] VelocityGenerator
Date Wed, 31 Oct 2001 21:44:56 GMT

Hello, I have made a few changes to the VelocityGenerator that I thought
others might be interested in. The patch uses the new Velocity 1.2
VelocityEngine instead of the Velocity 1.1 Singleton. The change allowed
me to code a custom Velocity ResourceLoader that uses the Cocoon
SourceResolver interface. This means that we can now place our Velocity
templates anywhere we like instead of the hard-coded /templates directory.
It also allows us to take advantage of any custom protocols such as
cocoon: and context:.

I also added the ability to configure the VelocityEngine via properties
set in the sitemap. This allows the changing of Velocity parameters such
as the input.encoding/output.encoding, template caching, etc. I will
volunteer to submit a patch to the velocity-generator.xml xdocs if the
patch is deemed worthy of a commit.

Included in the patch file is an updated hello-page.vm and sitemap.xconf.
The patch was created at the xml-cocoon2 module level using 'cvs diff -u

In order for the patch to compile, the velocity-1.1.jar needs to be
replaced with the current velocity-1.2-rc2.jar available at



View raw message