我在websphere 8.5上使用 javax.faces-2.0.10.jar,我正在使用jboss-el-2.0.0.GA.jar,在我的web.xml中我有以下el配置: context-param param-namecom.sun.faces.expressionFactory/param-name param-valueorg.jboss.el.ExpressionFactory
<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.
classloader设置为parent last,我可以打开没有错误的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用作共享库.
