/** * Processes the specified template with the given model. * * @param templateURL The template URL. * @param model The root model. * @param out The output stream to process to. */ public void processTemplate(URL templateURL, Object model, PrintStream out) throws IOException, TemplateException { debug("Processing template %s.", templateURL); Configuration configuration = getConfiguration(); configuration.setDefaultEncoding("UTF-8"); Template template = configuration.getTemplate(templateURL.toString()); processTemplate(template, model, out); }
/** * Processes the specified template with the given model. * * @param templateURL The template URL. * @param model The root model. * @param out The output stream to process to. */ public void processTemplate(URL templateURL, Object model, PrintStream out) throws IOException, TemplateException { debug("Processing template %s.", templateURL); Configuration configuration = getConfiguration(); configuration.setDefaultEncoding("UTF-8"); Template template = configuration.getTemplate(templateURL.toString()); processTemplate(template, model, out); }