Home > Guides > Tag Developers Guide > Velocity > CeWolf charts using Velocity templates

Setup CeWolf

This currently only works with the most recent CVS version of WebWork but should be available in the upcoming 2.0 beta2

  1. Go to http://cewolf.sourceforge.net and grab a stable release of CeWolf (at the time of writing, the unstable builds do not work with WebWork).
  2. Edit your webwork.properties file and add "de.laures.cewolf.taglib.tags" to the property "webwork.velocity.tag.path"

Lastly add the CeWolf servlet to web.xml:

Create a DatasetProducer

This is the default DatasetProducer from the CeWolf tutorial.

Create the Velocity template

With the new WebWork refactorings, nested JSP tags with arbitrary parameters can be used, so we convert the CeWolf tutorial JSP script to Velocity.

In Velocity it looks like this:

As you may notice, CeWolf looks up it's DatasetProducer in the request attributes - it has no knowledge of the Velocity context. That's why we call $req.session.setAttribute(). The other attributes (such as the chartid) will be set by CeWolf, so we don't need to care about them.

Setup an action to disply the template

Now you should be able to fire up an action in the usual way with this template as the result and a nice chart should appear.