return;
}
// lookup Renderer we are going to use
Renderer renderer = null;
try {
log.debug("Looking up renderer");
String templateFile = null;
if("rss".equals(feedRequest.getFormat())) {
templateFile = "group-rss.vm";
} else if("atom".equals(feedRequest.getFormat())) {
templateFile = "group-atom.vm";
}
Template template = new StaticTemplate(templateFile, null, "velocity");
renderer = RendererManager.getRenderer(template);
} catch(Exception e) {
// nobody wants to render my content :(
if(!response.isCommitted()) response.reset();
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
}
// render content. use default size of about 24K for a standard page
try {
log.debug("Doing rendering");
renderer.render(model, response.getWriter());
} catch(Exception e) {
// bummer, error during rendering
log.error("Error during rendering for group-atom.vm", e);
if(!response.isCommitted()) response.reset();