Forwarding to a page from controller

Posted by

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");

 

Leave a Reply

Your email address will not be published. Required fields are marked *