如何检查服务器使用的是哪个版本的 EL [英] How can I check what version of EL is server using

查看:18
本文介绍了如何检查服务器使用的是哪个版本的 EL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检查服务器使用的 EL 版本.我正在运行 Websphere 7 .EL 类在 j2ee.jar 中,清单在下面.

How can I check what version of EL is server using . I am running Websphere 7 . EL classes are in j2ee.jar and manifest is below.

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 2.4 (IBM Corporation)
Specification-Title: Java Platform, Enterprise Edition Specification
Specification-Version: 5.0
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: Java Platform, Enterprise Edition Specification
Implementation-Version: 5.0
Implementation-Vendor: Sun Microsystems, Inc.
Class-Path: activation-impl.jar mail-impl.jar

推荐答案

EL 版本与 Servlet/JSP 版本密切相关,后者依赖于所使用的 servletcontainer 实现/版本以及 web.xml Web 应用程序的根声明.

EL version goes hand in hand with Servlet/JSP version which is dependent on the servletcontainer implementation/version used and also on the web.xml root declaration of your webapp.

  • Servlet 5.0 附带 JSP 3.0 和 EL 4.0(Jakarta EE 9).
  • Servlet 4.0 附带 JSP 2.3 和 EL 3.0 (Java EE 8).
  • Servlet 3.1 随附 JSP 2.3 和 EL 3.0 (Java EE 7).
  • Servlet 3.0 附带 JSP 2.2 和 EL 2.2 (Java EE 6).
  • Servlet 2.5 附带 JSP 2.1 和 EL 2.1 (Java EE 5).
  • Servlet 2.4 附带 JSP 2.0 和 EL 2.0 (J2EE 1.4).
  • Servlet 2.3 附带 JSP 1.2,没有 EL (J2EE 1.3).EL 由 JSTL 1.0 提供,仅在 JSTL 标签内工作.

WebSphere 7 是经过 Java EE 5 认证的容器,这意味着 Servlet 2.5 又与 JSP/EL 2.1 一起提供.但是,如果您的 webapp 的 web.xml 被声明为符合例如 Servlet 2.4,那么您的 webapp 将使用 JSP/EL 2.0 以 Servlet 2.4 模式运行.

WebSphere 7 is a Java EE 5 certified container which thus implies Servlet 2.5 which in turn thus comes with JSP/EL 2.1. However, if the web.xml of your webapp is declared conform for example Servlet 2.4, then your webapp will run in Servlet 2.4 modus with JSP/EL 2.0.

既然你标记了这个 JSF,我猜这个问题的唯一目的是弄清楚你是否可以使用新的 EL 2.2 特性,即能够在 EL 中使用参数调用非 getter 方法.因此,您的容器本身并不支持.但是,您可以安装 JBoss EL 根据 这个答案 让它在 Servlet 2.5 容器上工作.

Since you tagged this JSF, I guess that the sole purpose of this question is to figure out if you could use the new EL 2.2 feature of being able to invoke non-getter methods with arguments in EL. That's thus not natively supported by your container. However, you could install JBoss EL as per this answer to get it to work on Servlet 2.5 containers.

这篇关于如何检查服务器使用的是哪个版本的 EL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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