In VelocityTools 1.4, there is little support for auto-loading GenericTools, i wouldn't bother. Just create a context, add tool instances that you want and then use the already available context-chaining support in VelocityContext to use that "tool" context as a base context for other ones.
In VelocityTools 2.0, you can just create a ToolManager and ask it for a ToolContext (which you can use like a standard VelocityContext) via the createContext() method. Auto-loading definitely requires a special context. On Mon, Jul 20, 2009 at 1:53 PM, Steve Cohen<sco...@javactivity.org> wrote: > > Steve Cohen wrote: > > ... > > (never mind any of what I wrote before, I have now boiled it down to one > hopefully intelligent question): > > > I am NOT using VelocityView but instantiating, configuring and initializing > a VelocityEngine in java code. I don't use Velocity View. > Since I don't use VelocityView, and the documentation for Velocity Tools > assumes I do > > (http://velocity.apache.org/tools/releases/1.4/generic/EscapeTool.html) > telling me this: > >> *Toolbox Configuration Example* >> >> <tool> >> <key>esc</key> >> <scope>application</scope> >> <class>org.apache.velocity.tools.generic.EscapeTool</class> >> </tool> >> > how do I perform this same step in java code (i.e. what > applicationAttributes or runtime Properties must I set, in order for my > VelocityEngine to see the Tools generally or the EscapeTool in particular > (which is all I need)? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org > For additional commands, e-mail: user-h...@velocity.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org