}
public static void prepareFile(String templateFilePath, Properties propFile,
String output, String input)
throws IOException {
VelocityParser velInstance = new VelocityParser(input
+ templateFilePath + ".vm");
Enumeration<Object> keys = propFile.keys();
while (keys.hasMoreElements()) {
String key = (String) keys.nextElement();
velInstance.addToContext(key, propFile.get(key));
}
Charset cs = Charset.forName(FILE_ENCODING);
OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(
output + templateFilePath + ".jsp"), cs);
System.out.println(output + templateFilePath + ".jsp");
velInstance.processTemplate(osw);
}