Posted on

JSF page redirection Example

To enable the page redirection, append faces-redirect=true at the end of the view name:

return FacesContext.getCurrentInstance().getViewRoot().getViewId() + "?faces-redirect=true";

<h:commandButton action="page1?faces-redirect=true" value="Page1" />
Leave a Reply

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