if (!isAjaxRequest(facesContext)) {
return false;
}
ResponseWriter writer = facesContext.getResponseWriter();
if (writer == null) {
RenderKit renderKit = facesContext.getRenderKit();
if (renderKit == null) {
RenderKitFactory renderFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
Application application = facesContext.getApplication();
ViewHandler applicationViewHandler = application.getViewHandler();
String renderKitId = applicationViewHandler.calculateRenderKitId(facesContext);
renderKit = renderFactory.getRenderKit(facesContext, renderKitId);
}
writer = renderKit.createResponseWriter(((HttpServletResponse)
facesContext.getExternalContext().getResponse()).getWriter(), null, null);
}
ResponseUtils.ensureNoCacheHeader(facesContext);
writer.startElement("redirect", null);
writer.writeAttribute("url", url, null);