code: protected boolean actuallyRenderView(FacesContext facesContext, UIViewRoot viewToRender)
        throws IOException
    {
        // Set the new ResponseWriter into the FacesContext, saving the old one aside.
        ResponseWriter responseWriter = facesContext.getResponseWriter();
    
        // Now we actually render the document
        // Call startDocument() on the ResponseWriter.
        responseWriter.startDocument();
    
        // Call encodeAll() on the UIViewRoot
        viewToRender.encodeAll(facesContext);
    
        // Call endDocument() on the ResponseWriter
        responseWriter.endDocument();
    
        responseWriter.flush();
        
        // rendered successfully -- forge ahead
        return true;
    }
docs: Render the view now - properly setting and resetting the response writer
  [MF] Modified to return a boolean so subclass that delegates can determine
  whether the rendering succeeded or not. TRUE means success.