I am using velocity engine template for mailing in struts1 and hibernate configuration.
I got error: org.apache.velocity.exception.ResourceNotFoundException while I try to send mail.
I have included velocity1.5.jar, mail.jar, activation.jar, smtp.jar.
I include the velocity template path here
String velocityTemplate = "mailTemplate/sendMail.vm";
and the mailTemplate folder is in WEB-INF/classes folder
I got that error when code executes this line
Template template = velocityEngine.getTemplate(velocityTemplate);
can any one help me regarding this?
It will be more appreciable if any one help me.
As BenM said we have to configure the Resource Loader as a ClasspathResourceLoader
and I just added the latest version of the following jar. now it’s working properly.
–> commons-collections-3.2.1.jar
–> commons-lang-2.4.jar
once again Thanks BenM