无法找到EL RI表达工厂 [英] Unable to locate the EL RI expression factory

查看:101
本文介绍了无法找到EL RI表达工厂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中出现以下异常.

I am getting the following exception in my application.

com.sun.faces.config.ConfigurationException: 它似乎是JSP版本的 容器早于2.1且无法 定位EL RI表达式 工厂, com.sun.el.E​​xpressionFactoryImpl.如果 不使用JSP或EL RI,请确保 上下文初始化参数, com.sun.faces.expressionFactory,是 正确设置.

com.sun.faces.config.ConfigurationException: It appears the JSP version of the container is older than 2.1 and unable to locate the EL RI expression factory, com.sun.el.ExpressionFactoryImpl. If not using JSP or the EL RI, make sure the context initialization parameter, com.sun.faces.expressionFactory, is properly set.

如何在web.xml中设置EL详细信息.

How to set the EL details in the web.xml.

推荐答案

该异常表明需要JSP 2.1.您需要确保将web.xml声明为Servlet 2.5或更高版本,并且servlet容器支持它(Tomcat 6,Glassfish 2,JBoss AS 5等,或更高版本). JSP 2.1与Servlet 2.5紧密结合.正确声明为web.xml的Servlet 2.5如下所示:

The exception is telling that JSP 2.1 is required. You need to ensure that your web.xml is declared as Servlet 2.5 or newer, and that your servletcontainer supports it (Tomcat 6, Glassfish 2, JBoss AS 5, etc, or newer). JSP 2.1 goes hand in hand with Servlet 2.5. A proper Servlet 2.5 declared web.xml starts as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app 
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">

    <!-- Config here. -->

</web-app>

如果您使用的是较旧版本的servlet容器,而您实际上确实无法升级到至少与Servlet 2.5兼容的servlet容器,那么您需要首先让我们知道它是哪一个,以便我们可能会发布更合适的答案/解决方法.

If you're using an older versioned servletcontainer which you can really not upgrade to at least a Servlet 2.5 compatible one, then you need to let us know first which one it is so that we can if possibly post more suited answers/workarounds.

这篇关于无法找到EL RI表达工厂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆