InputStream stream = getClass().getResourceAsStream(templateName);
if (stream == null) {
throw new MustacheException("Template not found: " + templateName);
}
Mustache mustache = mf.compile(new InputStreamReader(stream), templateName);
mustache.execute(response.getWriter(), parameters);
response.setStatus(status);
response.setContentType(contentType);
} catch (MustacheException e) {
LOG.error("Template exception.", e);