velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <>
Subject Re: What substitutes ToolboxManager.getToolboxContext
Date Thu, 18 Oct 2007 20:56:37 GMT
The replacement for getToolboxContext(Object) is
ToolboxManager.getToolbox(Object) which returns a Map of initialized
tools.  If you simply want any old VelocityContext, then you just
create it yourself like this:

VelocityContext ctx = new

If you specifically want a, then you will
still need to create it yourself and then set the toolbox, like this:

ChainedContext ctx = new ChainedContext(myVelocityEngine, httprequest,
httpresponse, servletcontext);

the latter is what the VelocityViewServlet does in its
createContext(...) method.

On 10/18/07, Manali Joshi <> wrote:
> Hi,
> I am upgrading to Velocity tools 1.3 release to be able to use the
> ViewResourceTool. But 1.3 removed the deprecated method
> ToolboxManager.getToolboxContext. So, what can I use in code to replace this
> in order to get a chained velocity context ?
> thanks,
> mj

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message