HttpServletResponse servletResponse = (HttpServletResponse)response;
// only parse HTML responses
if (extendedResponse.getContentType() != null && isValidContentType(extendedResponse.getContentType()))
{
addResource.parseResponse(extendedRequest, extendedResponse.toString(),
servletResponse);
addResource.writeMyFacesJavascriptBeforeBodyEnd(extendedRequest,
servletResponse);