天天看点

jsf的异常Cannot find FacesContext

在web.xml配置中的url-pattern配置。

一般新建工程默认是index.jsp, 那么应该就直接用.faces在地址栏请求

即输入index.faces请求.

或者在index.jsp加入jsp标签<jsp:forward page="/login.faces"/>