velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Jagtap <>
Subject Error in intializing Velocity for StringResourceLoader
Date Sat, 28 Jun 2008 10:13:26 GMT

I am trying to invoke Velocity using following code-

VelocityEngine ve = new VelocityEngine();

Properties p = new Properties();
p.setProperty( "resource.loader", "String" );
p.setProperty( "class.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.StringResourceLoader" );        


VelocityContext context = new VelocityContext();

I am trying to do the above after reading javadoc for
ClasspathResourceLoader. the javadoc says-
resource.loader = class class.resource.loader.class =
should be used. I tried these properties and my templates are loaded from

But now I need to create my templates dynamically. For this I am using
StringResourceLoader. But after the above mentioned initialization of
Velocity, I get following error-
WARNING: ResourceManager : No configuration information for resource loader
named 'String'. Skipping.

Please help me in this issue. How do I initialise VelocityEngine to load
velocity templates using StringResourceLoader

Thanks and Regards,
View this message in context:
Sent from the Velocity - User mailing list archive at

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

View raw message