// workaround for mojarra -> mojarra doesn't reset PartialResponseWriter#inChanges if we call externalContext#resetResponse
if (responseResetted && context.getPartialViewContext().isAjaxRequest()) {
ExternalContext externalContext = context.getExternalContext();
PartialResponseWriter writer = context.getPartialViewContext().getPartialResponseWriter();
externalContext.addResponseHeader("Content-Type", "text/xml; charset=" + externalContext.getResponseCharacterEncoding());
externalContext.addResponseHeader("Cache-Control", "no-cache");
externalContext.setResponseContentType("text/xml");
writer.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
writer.startElement("partial-response", null);
writer.startElement("redirect", null);