velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <skitch...@apache.org>
Subject Re: ResourceLoader: loading files relative to template; using custom ResourceLoader
Date Mon, 16 Jun 2008 11:21:42 GMT
Never mind, I figured it out.

Simon Kitching schrieb:
> This suggests to me that I should be doing this:
>         CustomResourceLoader loader = new CustomResourceLoader().
>         VelocityEngine e = new VelocityEngine();
>         Properties p = new Properties();
>         p.put( "resource.loader", "local" );
>         p.put( "local.resource.loader.instance", loader);
>         e.init(p);
>   
Passing non-string values via a Properties file doesn't work. But I can
use either
  e.setProperty(String, object)
  e.init()
or
  e.setExtendedProperties(ExtendedProperties ep)
  e.init()

So simple. Sorry for the email, I was fixated on "init" :-(

Regards,
Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message