code: private void _saveRedirectValue(FacesContext facesContext)
      {
          ExternalContext externalContext = facesContext.getExternalContext();
          
          // This request contains a redirect. This condition is in general 
          // triggered by a NavigationHandler. After a redirect all request scope
          // values get lost, so in order to preserve this value we need to
          // pass it between request. One strategy is use a cookie that is never sent
          // to the client. Other alternative is use the session map.
          // See _restoreRedirectValue() for restoring this value.
          HttpServletResponse httpResponse = ExternalContextUtils
                  .getHttpServletResponse(externalContext);
          if (httpResponse != null)
          {
              Cookie cookie = _createFlashCookie(FLASH_REDIRECT, "true", externalContext);
              httpResponse.addCookie(cookie);
          }
          else
          {
              externalContext.getSessionMap().put(FLASH_REDIRECT, true);
          }
      }
docs: Saves the value of setRedirect() for the next request, if it was true