public void renderPage(IRequestCycle cycle, String pageName) throws IOException
{
cycle.activate(pageName);
IPage page = cycle.getPage();
ContentType contentType = page.getResponseContentType();
PrintWriter printWriter = _response.getPrintWriter(contentType);
IMarkupWriter writer = _markupWriterSource.newMarkupWriter(printWriter, contentType);
String namespace = _response.getNamespace();
PageRenderSupportImpl support = new PageRenderSupportImpl(_assetService, namespace, null);
TapestryUtils.storePageRenderSupport(cycle, support);
IMarkupWriter nested = writer.getNestedWriter();
cycle.renderPage(nested);
String id = "Tapestry Portlet " + _applicationId + " " + namespace;
writer.comment("BEGIN " + id);
writer.comment("Page: " + page.getPageName());
writer.comment("Generated: " + new Date());
writer.comment("Framework version: " + Tapestry.VERSION);
support.writeBodyScript(writer, cycle);