Hi
I'm trying to use Velocity templates with Jboss, but when call VelocityServlet method getTemplate("name.vm") it produces NullPointerException. Why?? I'm using JBoss 3.2.1 with Tomcat and Velocity 1.3. Here is piece of code:
Template template = null;
try {
template = getTemplate("simple.vm"); // NullPointerExc!!!!!
}
catch( ResourceNotFoundException exc ) {
out.println("couldn't find a template");
}
catch( ParseErrorException exc ) {
out.println("syntax error");
}
catch( Exception exc ) {
out.println("other error");
exc.printStackTrace(out);
}