velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carfield Yim <>
Subject How to config velocity to use ClasspathResourceLoader?
Date Tue, 02 Nov 2004 05:22:17 GMT
Can anybody tell me how to setup VelocityEngine to use
ClasspathResourceLoader? I've the following code but fail to work:

VelocityEngine ve = new VelocityEngine();
ve.setProperty("resource.loader", "class");
Template t = ve.getTemplate(templatePath, "UTF-8");
t.merge(velocityContext, writer);

At "Template t = ve.getTemplate(templatePath, "UTF-8");", I get
NullPointerException, can anyone give me some hint about that?

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

View raw message