public static String generateStringFromTemplate(File templateFile,Map<String,Object> parameters){
  try {
    Template template=getTemplate(templateFile);
    Writable finishedTemplate=template.make(parameters);
    return finishedTemplate.toString();
  }
 catch (  Exception e) {
    DocReporter.printError("Error whilst generating page from template " + templateFile);
    DocReporter.printError(e.getMessage());
    throw new RuntimeException(e);
  }
}

public static String generateStringFromTemplate ( File templateFile , Map < String , Object > parameters ) { try { Template template = getTemplate ( templateFile ) ; Writable finishedTemplate = template . make ( parameters ) ; return finishedTemplate . toString ( ) ; } catch ( Exception e ) { DocReporter . printError ( "Error whilst generating page from template " + templateFile ) ; DocReporter . printError ( e . getMessage ( ) ) ; throw new RuntimeException ( e ) ; } }
call the template with the parameters , but return the response as a string
