<navigation-rule> <from-view-id>pageDepart.xhtml</from-view-id> <navigation-case> <from-action>#{nomBean.methode}</from-action> <from-outcome>loginok</from-outcome> <to-view-id>/pageSuivanteLoginOk.xhtml</to-view-id> </navigation-case> <navigation-case> <from-action>#{nomBean.methode}</from-action> <from-outcome>nolog</from-outcome> <to-view-id>/pageErreur.xhtml</to-view-id> </navigation-case> </navigation-rule>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionpublic ManagedBean(){ if(droitsInsuffisants){ rediriger(); } } public void rediriger(){ try { FacesContext.getCurrentInstance().getExternalContext().redirect("http://localhost:8080/droitsInsuffisants.jsf"); } catch (IOException e) { e.printStackTrace(); } }