velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bluejoe" <>
Subject Re: Is it possible to load toolboxes from multiple toolbox.xml files?
Date Fri, 20 Feb 2009 09:15:54 GMT
Thank you! However, I failed to find VelocityView class in the lastest release version of velocity-tools-view-1.4.jar.
Then I turned to SVN repository and found it there. I want to know when the version including
VelocityView class will be released? :)

----- Original Message ----- 
From: "Nathan Bubna" <>
To: "Velocity Users List" <>
Sent: Thursday, February 19, 2009 11:14 PM
Subject: Re: Is it possible to load toolboxes from multiple toolbox.xml files?

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