Reading Time: < 1 minute
This is very useful when you compare that a passed object is null in the forthcoming controller you may directly forward user to a different page or maybe assign a message regarding the issue that the user had faced this error it depends on your development favorite
FacesContext.getCurrentInstance().getExternalContext().redirect("index.jsf");