.get(AjaxContext.HEAD_EVENTS_PARAMETER);
htmlParser.setHeadNodes(headEvents);
htmlParser.setDoctype(getPublicid());
htmlParser.setViewState((String) context.getExternalContext().getRequestMap()
.get(AjaxViewHandler.SERIALIZED_STATE_KEY));
htmlParser.parseHtml(reader, response.getWriter());
} finally {
reuseParser(htmlParser);
}
}
// TODO - code for output stream.