将JBoss 5.1从EL 2.1升级到EL 2.2? [英] Upgrade JBoss 5.1 from EL 2.1 to EL 2.2?

查看:204
本文介绍了将JBoss 5.1从EL 2.1升级到EL 2.2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题快速而简单。

JBoss 5.1开箱即用,支持JSP和EL(表达式语言)2.1和Servlet 2.5。

JBoss 5.1 comes out of box supporting JSP and EL (Expression Language) 2.1 and Servlet 2.5.

是否可以升级或破解它以使用EL 2.2?

Is it possible to upgrade or hack this to use EL 2.2?

更新:

我尝试了BalusC的回答并得出以下错误:

I tried what BalusC's answer stated and got the following error:


2011-08-01 10:29:52,418严重[ javax.enterprise.resource.webcontainer.jsf.config](main)无法实例化ExpressionFactory'org.jboss.el.E​​xpressionFactoryImpl'
2011-08-01 10:29:52,441严重[javax.enterprise.resource。 webcontainer.jsf.config](main)部署期间的严重错误:
com.sun.faces.config.ConfigurationException:看起来容器的JSP版本早于2.1并且无法找到EL RI表达式工厂, com.sun.el.E​​xpressionFactoryImpl。如果不使用JSP或EL RI,请确保正确设置了上下文初始化参数com.sun.faces.expressionFactory。

2011-08-01 10:29:52,418 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (main) Unable to instantiate ExpressionFactory 'org.jboss.el.ExpressionFactoryImpl' 2011-08-01 10:29:52,441 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (main) Critical error during deployment: 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.

我不确定这意味着什么或如何绕过它。为什么它认为JSP版本低于2.1?

I am not sure what this means or how to get around it. Why does it think there is a JSP version below 2.1?

推荐答案

不,虽然替换libs是微不足道的,但你要追求所有必须重新声明 web.xml 符合Servlet 3.0以使其工作。这不会被JBoss 5.1(这是一个Servlet 2.5 impl)所识别,而不会将其所有库替换为JBoss 6.0(这是一个Servlet 3.0 impl)中的库。将整个内容升级到JBoss 6.0会更容易。

No, while replacing the libs is trivial, you'd after all have to redeclare the web.xml conform Servlet 3.0 to get it to work. This ain't going to be recognized by JBoss 5.1 (which is a Servlet 2.5 impl) without replacing all of its libraries to be the same as the ones in JBoss 6.0 (which is a Servlet 3.0 impl). It would be easier to just upgrade the whole thing to JBoss 6.0.

我知道你正在使用JSF 2.0(当查看旧的问题标签时)。如果唯一的功能要求是支持使用EL 2.2中可能的参数的JSF支持bean操作方法调用,那么最好的办法是删除 JBoss-EL JAR 文件在 / WEB-INF / lib 您的webapp并将以下上下文参数添加到您的webapp的 web.xml ,假设您使用的是Mojarra。

I understand that you're using JSF 2.0 (when looking at the old question tags). If the sole functional requirement is to support JSF backing bean action method invocations with arguments like as possible in EL 2.2, then your best bet is to drop a copy of JBoss-EL JAR file in /WEB-INF/lib of your webapp and add the following context param to your webapp's web.xml, assuming that you're using Mojarra.

<context-param>     
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>   
</context-param>

不,在JBoss级别配置它是不可能的。你真的必须在webapp级别这样做。有关JBoss EL(在EL中调用带有参数的方法的启动者)的更多信息,查看Seam文档的第34章

No, it's not possible to configure it at JBoss level. You'd really have to do it at webapp level. For more about JBoss EL (which was the initiator behind invoking methods with arguments in EL), check chapter 34 of the Seam documentation.

这篇关于将JBoss 5.1从EL 2.1升级到EL 2.2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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