我正在使用 javax.faces-2.0.10.jar 在 websphere 8.5 我正在使用 jboss-el-2.0.0.GA.jar 在我的 web.xml 中,我有以下 el 配置:
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
</context-param>
在日志中,我可以看到 jsf 已成功初始化,但我也看到以下错误:
JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.
类加载器最后设置为父级,我可以打开 jsp 和 xhtml 页面而没有错误,但我一直在日志中收到上述错误,有什么想法吗?
最佳答案
描述了此错误的产生方式 here .
要解决它,您可以尝试:
<context-param>
<param-name> com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP </param-name>
<param-value>true</param-value>
</context-param>
作为
com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP Specifies to load the JSF runtime when the application server starts up. If this parameter is set to false or removed, JSF runtime is loaded and initialized when the first JSF request is processed. This might disable custom JSF extensions such as factories defined in the project.
WAS docs
您也可以尝试使用您的 jboss-el-2.0.0.GA.jar 作为共享库。
关于jsf-2 - JSF1027 : [null] The ELResolvers for JSF were not registered with the JSP container,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22140974/