public void renderPageResponse(Page page) throws IOException
{
Defense.notNull(page, "page");
ContentType contentType = pageContentTypeAnalyzer.findContentType(page);
// For the moment, the content type is all that's used determine the model for the markup writer.
// It's something of a can of worms.
MarkupWriter writer = markupWriterFactory.newMarkupWriter(contentType);
markupRenderer.renderPageMarkup(page, writer);
PrintWriter pw = response.getPrintWriter(contentType.toString());
writer.toMarkup(pw);
pw.flush();
}