IMarkupWriter writer = _markupWriterSource.newMarkupWriter(printWriter, contentType);
String namespace = _response.getNamespace();
IMarkupWriter nested = writer.getNestedWriter();
ResponseBuilder builder = new DefaultResponseBuilder(cycle, nested, _assetFactory, namespace, false);
builder.renderResponse(cycle);
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);
builder.writeBodyScript(writer, cycle);
nested.close();
builder.writeInitializationScript(writer);
writer.comment("END " + id);
writer.close();