private static void doFacesRedirect(HttpServletRequest request, HttpServletResponse response,
            String path, Object... paramValues) {
        if (hasFacesContext()) {
            Faces.redirect(path, paramValues);
        } else {
            Servlets.facesRedirect(request, response, path, paramValues);
        }
    }
flash cookie is preserved here

@param request
@param response
@param path
@param paramValues
support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/FormResubmitSupport.java