// go through all declared templates
List templateList = ci.getTemplateInfoList();
for (Iterator i = templateList.iterator(); i.hasNext(); )
{
TemplateInfo ti = (TemplateInfo)i.next();
File outputFile = new File(outputModule, ti.getOutput());
File outputPath = outputFile.getParentFile();
if (!outputPath.exists())
if (!outputPath.mkdirs())
throw new IOException("cannot create directory: " + outputPath);
BufferedWriter out = new BufferedWriter(new FileWriter(outputFile));
try {
boolean success = ve.mergeTemplate(template + '/' + ti.getInput(), ctx, out);
if (success == true)
{
String errorMsg = (String)ctx.get(TEMPLATE_ERROR_PARAM);