* or if setRedirect(true) was called on this request and we are
* in phase 5 (invoke application).
*/
private boolean _isLastPhaseInRequest(FacesContext facesContext)
{
final PhaseId currentPhaseId = facesContext.getCurrentPhaseId();
boolean lastPhaseNormalRequest = PhaseId.RENDER_RESPONSE.equals(currentPhaseId);
// According to the spec, if there is a redirect, responseComplete()
// has been called, and Flash.setRedirect() has been called too,
// so we just need to check both are present.