|Home > Guides > Tag Developers Guide > Velocity > CeWolf charts using Velocity templates|
This currently only works with the most recent CVS version of WebWork but should be available in the upcoming 2.0 beta2
Lastly add the CeWolf servlet to web.xml:
This is the default DatasetProducer from the CeWolf tutorial.
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.
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.