如何在 Weblogic 10.3.x 上利用 EL 2.2 功能?
我安装了Weblogic 10.3.5。我在服务器上部署了带有 JSF 2.0 和 JSTL 1.2 的 WAR。但我也需要 EL 2.2 功能。我需要什么 JAR?如果有人能从头开始向我指出分步指南,那就太好了,因为我已经尝试设置了几个小时但没有成功。
I have Weblogic 10.3.5 installed. I deployed a WAR with JSF 2.0 and JSTL 1.2 on the server. But I need EL 2.2 functionality as well. What JARs do I need? It'd be great if someone can point me to a step-by-step guide from scratch as I've been trying to set this up for hours with no luck.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最简单的是删除 jboss-el.jar,这是一个 EL 2.1 兼容实现,提供相同的功能EL 2.2 中的功能,
/WEB-INF/lib
并告诉 JSF 实现改用该 EL 实现。如何做到这一点取决于所使用的 JSF 实现。对于 Mojarra,您需要将以下上下文参数添加到web.xml
中:对于 MyFaces,它是以下上下文参数:
另请参阅:
Easiest is to drop jboss-el.jar, which is an EL 2.1 compatible implementation offering the same features as EL 2.2, in
/WEB-INF/lib
and tell the JSF implementation to use that EL implementation instead. How to do that depends on the JSF implementation being used. In case of Mojarra, you need to add the following context parameter to theweb.xml
:And in case of MyFaces, it's the following context parameter:
See also:
我觉得接受的答案可能适用于所有情况,也可能不适用于所有情况,当然,问题是您将陷入单一 JBoss EL 版本,而没有任何在适当的 2.2 补丁版本中继续修复错误的支持。执行。
最终,这是在 WebLogic 10.3.6 服务器上对我有用的方法。
我从 Glassfish 下载了 EL 2.2 API 和实现 jar,并将它们包含在我的 Web 应用程序的
WEB-INF/lib
文件夹中。执行此操作后,您通常需要向
web.xml
添加一个上下文参数,以表示要为新版本加载的类EL 实现就像 BalusC 的答案一样。然而,Weblogic 似乎并不关心这一点,它的类加载器有自己的方式。您需要在weblogic.xml
中指定,以优先加载WEB-INF/lib
中的 EL 类。这将允许您加载 Glassfish 实现来代替与 WebLogic 捆绑在一起的旧 EL 实现。I feel that the accepted answer may or may not work for every situation, and of course the hook is that you will be stuck to a single JBoss release of EL without any of the support of continuing bug fixes in future patch releases of a proper 2.2 implementation.
Ultimately here is what worked for me on a WebLogic 10.3.6 server.
I downloaded the EL 2.2 API and Implementation jars from Glassfish and included those in the
WEB-INF/lib
folder of my web application.After doing this you would normally need to add a context parameter to
web.xml
to signify the class to load for the new EL implementation like in BalusC's answer. Weblogic doesn't seem to care about this however, its classloader has its own way of things. You need to specify in yourweblogic.xml
to give preferential class loading to the EL classes inWEB-INF/lib
. This will allow your Glassfish implementation to be loaded in place of the older EL implementation bundled with WebLogic.我必须重新提出这个问题,因为我发现 el 2.2 的 jboss 实现有一个 permgenspace 内存泄漏< /a> 重新部署时。
我尝试了其他几个可用的实现,即
但没有运行。
使用 2.2 glassfish 实现也不起作用(即使使用prefer-web-inf-classes 或prefer-application-package),导致类加载问题。
如果有任何建议,我将不胜感激,该实现是最新的,并且可以与 weblogic 一起使用,而无需更改服务器类路径。
I got to reanimate the question as i found out that the jboss implementation of el 2.2 has a permgenspace memory leak upon redeploying.
I tried several other implementations available, namely
but got none running.
Using the 2.2 glassfish implementation didn't work either (even with prefer-web-inf-classes, or prefer-application-package), cause of classloading problems.
I'd appreciate any suggestions which implementation is up to date and works with weblogic without changes in the server classpath.