apache.org.velocity...... Help needed!!!

Hi,

I am using the velocity framework of the apache.... I am getting a template as follows..

Template temp=Velocity.getTemplate("mailTemplate.vm");

where mailTemplate.vm is a file which as some data like $greeting $ name $ content $signature...

here i am getting an exception that resourceNorFound though i have mailTemplate.vm file.....

can anyone suggest me for this?

[408 byte] By [smart_cheetaa] at [2007-11-26 17:52:40]
# 1
May you should try giving the complete path (absolute path) to mailTemplate.vm ? Did you try that?
satishva at 2007-7-9 5:05:36 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

public ContructorName() throws Exception

{

configure(engine);

}

private void configure(VelocityEngine engine) throws Exception

{

Properties props = new Properties();

props.setProperty(VelocityEngine.RESOURCE_LOADER, "classpath");

props.setProperty("classpath." + VelocityEngine.RESOURCE_LOADER + ".class",ClasspathResourceLoader.class.getName());

engine.init(props);

}

configuring your engine might help and then call engine.getTemaplte(filename);

vinukhoslaa at 2007-7-9 5:05:36 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...