我在JSF的Web应用程序中有这个。
<h:body>
<br />
<h:link outcome="/secured/areas/List" value="Show All Areas Items"/>
<br />
<h:link outcome="/secured/aulas/List" value="Show All Aulas Items"/>
<br />
<h:link outcome="/secured/dispositivos/List" value="Show All Dispositivos Items"/>
<br />
<h:link outcome="/secured/edificios/List" value="Show All Edificios Items"/>
<br />
<h:link outcome="/secured/marcas/List" value="Show All Marcas Items"/>
<br />
<h:link outcome="/secured/modelos/List" value="Show All Modelos Items"/>
<br />
<h:link outcome="/secured/rolesusuarios/List" value="Show All Rolesusuarios Items"/>
<br />
<h:link outcome="/secured/tiposdispositivos/List" value="Show All Tiposdispositivos Items"/>
<br />
<h:link outcome="/secured/usuarios/List" value="Show All Usuarios Items"/>
<br />
<h:link outcome="/secured/valorescomandos/List" value="Show All Valorescomandos Items"/>
<br />
<h:link outcome="/secured/estadosdispositivos/List" value="Show All Estadosdispositivos Items"/>
</h:body>
当我尝试访问/areas/List.xhtml
时响应此错误javax.faces.FacesException: Could not resolve NavigationCase for outcome: /index
at org.primefaces.renderkit.OutcomeTargetRenderer.getTargetURL(OutcomeTargetRenderer.java:86)
我在faces-config.xml中尝试了这个,但没有运行。
<navigation-rule>
<from-view-id>/main/webapp/secured/index.xhtml</from-view-id>
<navigation-case>
<from-outcome>index</from-outcome>
<to-view-id>/main/webapp/secured/aulas/List.xhtml</to-view-id>
</navigation-case>
</navigation-rule>