我有一个带有 Spring Boot 1.2.4(web,security,data-jpa)、Primefaces 5.2、JSF 2.2 (Mojarra 2.2.11) 的 Web 应用程序,没有任何 xml 配置文件。只有 faces-config.xml 用于 spring bean el 解析器:
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<!--el-resolver>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver
</el-resolver-->
</application>
<!--factory>
<exception-handler-factory>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
</exception-handler-factory>
</factory-->
</faces-config>
一切正常。现在,我想用 primefaces 异常处理程序处理 ViewExpiredException:http: //www.primefaces.org/docs/api/5.2/org/primefaces/application/exceptionhandler/PrimeExceptionHandlerELResolver.html
我的问题是:我可以在 faces-config.xml 中注册另一个 el-resolver 吗?如果没有,我该如何解决这个问题?
提前致谢。
编辑 :
我决定使用另一个 aproche。非常感谢Ajax 调用的会话超时处理