I'm unable to get the VelocityEngine.init(Properties p) method to work. VelocityEngine seems to be completely ignoring the properties. In my app, I'm using the following code (Velocity 1.4):

VelocityEngine ve = new VelocityEngine();
Properties p = new Properties();
p.load(stream);
ve.init(p);

Doing a p.list(new PrintStream(System.out)) gives the following:

resource.loader = class
class.resource.loader.class = org.apache.velocity.runtime.resource....
...

The problem is - ve.getProperty("resource.loader") now returns "[file]"! It also ignores all my logging configuration, which leads me to believe it's not even reading the properties.

It returns the expected value ("[class]") if I use the following initialization code instead of a Properties object:

ve.setProperty("resource.loader", "class");
...
ve.init();

I couldn't find any bug reports on this. Anyone see a no-brainer that I'm missing before I ask the devs?

-j

--
Jeremy Jongsma
Lead Architect
FutureSource, LLC
[EMAIL PROTECTED]
http://www.futuresource.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to