gpt4 book ai didi

java - Apache Taglibs 和 Glassfish JSTL 的实现之间的区别?

转载 作者:行者123 更新时间:2023-12-01 14:24:16 24 4
gpt4 key购买 nike

为了在maven项目中使用JSTL(JSP taglibs),需要导入:

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

然而,这还不够,因为这只是一个 API。一种解决方案是使用 Glassfish's implementation , 另一种是使用 Apache Taglibs .

两者有什么区别,推荐哪一种?

最佳答案

两者现在都支持 JSDL 1.2。 Glassfish 支持 JSTL 1.2,而 Apache 支持 1.1,“1.2 正在开发中”——自 2009 年以来,在我看来,这可能意味着该项目有点被放弃 。我已经将 GF 移植到 Tomcat 中(因为我们的大部分工作都是基于 GF 的,它是最容易借用的)并且没有遇到问题,但我可能只是幸运:-)

编辑:wrt JSTL1.1 vs 1.2,引用自Oracle JSTL page

The JSTL 1.2 Maintenance Release aligns with the Unified Expression Language (EL) that is being delivered as part of the JavaServer Pages (JSP) 2.1 specification. Thanks to the Unified EL, JSTL tags, such as the JSTL iteration tags, can now be used with JavaServer Faces components in an intuitive way.

关于java - Apache Taglibs 和 Glassfish JSTL 的实现之间的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11616817/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com