velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <>
Subject Re: Is it possible to load toolboxes from multiple toolbox.xml files?
Date Thu, 19 Feb 2009 15:14:58 GMT
Yeah, you can do this.  And there are several different ways it can be
done.  One is to use a custom VelocityView class.

public MyVelocityView extends VelocityView {

  protected void init(JeeConfig config) {
    String otherConfig = config.getInitParameter("user.toolbox.path");
    if (otherConfig != null) {
      FactoryConfiguration factoryConfig = getConfiguration(otherConfig, true);


You can call the configure(FactoryConfig) method as many times as you
like, of course.   Once you have your custom VelocityView class, you
can tell the VelocityViewServlet to use it by adding this to your


Like i said, there are other ways, but this was the first that came to
mind.  In general, the methods that are your friends are
velocityView.configure(FactoryConfiguration) and

On Wed, Feb 18, 2009 at 10:14 PM, bluejoe <> wrote:
> Hi,
> With VelocityView, I want to load toolboxes from multiple files, for example, from both
'/WEB-INF/toolbox.xml' and '/WEB-INF/toolbox.user.xml', the later file maybe be provided by
other developers instead of myself. But I have no idea how to do because it seems that VelocityViewServlet
only use '/WEB-INF/toolbox.xml' as input.
> Can anyone give me any advice?
> Thanks for any help.

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

View raw message