return;
}
// lookup Renderer we are going to use
Renderer renderer = null;
try {
log.debug("Looking up renderer");
Template template = new StaticTemplate(pageId, null, "velocity");
renderer = RendererManager.getRenderer(template);
} catch(Exception e) {
// nobody wants to render my content :(
// TODO: this log message has been disabled because it fills up
// the logs with useless errors due to the fact that the way these
// template ids are formed comes directly from the request and it
// often gets bunk data causing invalid template ids.
// at some point we should have better validation on the input so
// that we can quickly dispatch invalid feed requests and only
// get this far if we expect the template to be found
//log.error("Couldn't find renderer for page "+pageId, e);
if(!response.isCommitted()) response.reset();
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
}
// render content. use default size of about 24K for a standard page
CachedContent rendererOutput = new CachedContent(24567);
try {
log.debug("Doing rendering");
renderer.render(model, rendererOutput.getCachedWriter());
// flush rendered output and close
rendererOutput.flush();
rendererOutput.close();
} catch(Exception e) {