当前位置 : 主页 > 编程语言 > java >

jsf-2 – JSF1027:[null] JSF的ELResolvers没有在JSP容器中注册

来源:互联网 收集:自由互联 发布时间:2021-06-25
我在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
我在websphere 8.5上使用 javax.faces-2.0.10.jar,我正在使用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.

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用作共享库.

网友评论