各种JSTL库之间有什么区别,使用哪些库? [英] What's the difference between the various JSTL libraries out there and which to use?

查看:244
本文介绍了各种JSTL库之间有什么区别,使用哪些库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很困惑,因为构建和运行错误误导了我。从他们那里,我无法弄清楚各种JavaServer Page Standard Tag Libraries之间的区别。例如,我看到:

I'm puzzled because of build and run errors that mislead me. From them, I can't quite figure out what the distinction is between the various JavaServer Page Standard Tag Libraries. For instance, I see:

jstl.jar (in Apache Tomcat)
jstl-1.2.jar (in Tomahawk examples)
jstl-impl.jar (in GlassFish)

过去,我'从 javax.servlet.jsp.jstl

jstl-api-1.2.jar
jstl-impl-1.2.jar

这些后者是我在执行JavaServer Faces(JSF)工作时唯一能够可靠使用的。

These latter are the only ones I seem to be able to use reliably in doing JavaServer Faces (JSF) work.

我发现没有wiki语句对比这些不同的JAR 。是的,我知道他们的年龄不同。我想知道,例如, jstl.jar 不应该是一个现代的,确定的,一个( api impl )我只是使用错误的JSF库(例如 myfaces-api-1.2.8.jar )来使用它?

There's no wiki statement I've found that contrasts these different JARs. Yeah, I know their ages are different. I wonder, for instance, if jstl.jar isn't supposed to be a modern, definitive, both in one (api and impl) and I'm just using the wrong JSF libraries (myfaces-api-1.2.8.jar, for instance) to go with it?

我的目的是建立一套明确的JAR用于使用MyFaces或RichFaces进行Facelet工作,这两个我最了解。

My purpose is to establish a definitive set of JARs for doing Facelet work using either MyFaces or RichFaces, the two I know best.

感谢任何能够解决问题的人最佳实践。

Thanks to anyone who can shed some light and best practice on this.

推荐答案

如果您的目标servletcontainer内置了它,那么您不需要在 / WEB-INF / lib中。像Glassfish和JBoss AS这样的完全成熟的Java EE容器内置了它。

If your target servletcontainer has it builtin, then you do not need to have any in your /WEB-INF/lib. Full fledged Java EE containers like Glassfish and JBoss AS have it builtin.

如果你的目标servletcontainer没有内置它(Tomcat等),或者你想覆盖它尽可能多的servletcontainers,然后你需要选择最新的JSTL版本,它与你的 web.xml 声明的Servlet API版本相匹配。

If your target servletcontainer does not have it builtin (Tomcat, etc), or you want to cover as much as possible servletcontainers, then you need to pick the newest JSTL version which matches the Servlet API version as declared by your web.xml.

有关JSTL版本差异以及下载位置的更多详细信息,请参阅我们自己的 JSTL标记wiki页面 。它与您悬停 jstl 代码时的页面相同在您的问题下方,然后点击 info

For more detail about JSTL version differences and where to download them, see our own JSTL tag wiki page. It's the same page as when you hover the jstl tag below your question and click info.

这篇关于各种JSTL库之间有什么区别,使用哪些库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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