On Mon, Jul 20, 2009 at 5:51 PM, Nathan Bubna<nbu...@gmail.com> wrote: > 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.
just to clarify, since i just noticed you are creating a webapp. you could use the ServletToolboxManager in 1.4 to manage your tools without using the VelocityViewServlet at all. ask if you want more info on that. > 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. oh, and in 2.0, you would not need to do any configuration. just get a ToolContext and go, tools are lazy-loaded when used, so all are configured to be available by default. > 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