I did the following:
1) I moved the "velocityTemplates" directory to the WEB-INF directory (I am using maven so there is no "classes" directory - should I create one and pur the directory there?)
2) replace MyClass to the name of the class where the method resides: ReportCreator
3) set resourcepath to the velocity file name
I am getting a null pointer exception at the InputStream line. Also, Velocity.evaluate method using an InputStream is deprecated.
Main Topics
Browse All Topics





by: objectsPosted on 2009-03-04 at 19:24:11ID: 23802353
InputStream in = MyClass.class.getResourceA sStream(re sourcepath );
and put your teplates in WEB-INF/classes