<轉>JSTL標籤庫的版本

來源:互聯網
上載者:User

標籤:開發   開發規範   contain   有一個   狀態   應該   was   desc   been   

參考 http://www.bubuko.com/infodetail-1077023.htmlhttp://janedoneway.iteye.com/blog/1245949 從來沒認為這是個問題,不過最近發現網上關於這方面的資料比較亂,現將自己的瞭解整理在此,以備查閱。?Team Dev經常使用jstl標籤庫,開始也沒在意,大家都是簡單引入jstl.jar和standard.jar,後來發現這兩個包也有版本差別,各項目小組用的不同,在jsp中定義也有差別,還會引起衝突和代碼不相容。於是想在網上找個最新的包,使用一種最官方推薦的用法把團隊的開發規範一下。本以為這是個極簡單的活,不料卻也費了一番功夫。?首先,關於JSTL之前的各版本及用法,請見這篇文章:http://janedoneway.iteye.com/blog/1245949其中關於1.2版本,只有一個jar包,開啟看一下。其實是把之前兩個jar包(jstl.jar,介面定義包;standard.jar實現包)合二為一了,但這個包的出處卻不詳,懷疑是誰為了使用便自己打成的包。關於JSTL標準及介面定義,其最新版應該就是1.2版了,這個大約是2011年推出的。?我這裡重點整理一下關於JSTL實現的最新進展。在2009年之前,Jakarta Taglib項目組提供了JSTL的各版本的實現jar包(也就是常見的jstl.jar和standard.jar),此後taglib項目則被轉到tomcat小組的旗下,具體見下方Starting in 2000, Jakarta hosted the Jakarta Taglibs project, a large collection of JSP Tag Libraries. They ranged from simple utility libraries and UI libraries, to Dreamweaver extensions and an implementation of the JSP Standard Tag Library (JSTL) specification.

With the advent of JSTL, the core features of many of the libraries had been standardized and the need for these libraries diminished. As such, much of the Taglibs codebase moved into maintenance mode.In 2008 and 2009, the majority of these libraries were deprecated and have now been retired. The remaining work has moved over to the?Tomcat Taglibs?project - namely the following taglibs:- Standard - The implementations of the various JSTL specifications- RDC - Reusable Dialog Components TaglibIn 2014 the RDC Taglib was retired from the Tomcat Taglibs project.?大概翻譯下:從2000年開始,Jakarta開發管理著Jakarta標籤庫項目,這是一個JSP標籤庫的大集合。這個項目包括了從簡單的應用庫到UI庫,還包括Dreamweaver擴充以及對JSP標準標籤庫定義(JSTL)的實現。隨著JSTL的出現,包含在這個項目中很多庫特徵已被標準化,並且對這些庫的需求也在減少。 相應地,很多標籤庫的基礎代碼已轉為維護狀態(不再更新)。2008到2009年,這些庫中的主要部分都不推薦使用,到現在已經被廢棄了。其餘的工作被挪到了Tomcat Taglibs項目----也就是下列的標籤庫:標準--各種JSTL定義的實現。?-------------------------------------------------------------------------------------------------於是轉到tomcat的taglib項目頁面:http://tomcat.apache.org/taglibs/
2015/02/20 [Standard]?The Apache Standard Taglib 1.2.3, a minor bugfix version, has been released.
2014/01/02 [Standard]?The Apache Standard Taglib 1.2.1, an implementation of JSTL 1.2, has been released.
2009/06/07 [ALL]?The Standard and RDC Taglibs have moved over to Tomcat. All other taglibs back at Jakarta have been deprecated.
?好傢夥,2009年接手這個項目,到2014年才更新一版,最新版本是2015年2月份。可以看到最新的版本是Standard1.2.3,實現的JSTL版本是JSTL1.2。系統要求是Servlet 2.5, JavaServer Pages 2.1.?到下載頁面下載到的卻是最新的1.2.5版 taglibs-standard-spec-1.2.5.jar(相當於之前的jstl.jar,屬於介面定義類)taglibs-standard-impl-1.2.5.jar jar(相當於之前的standard.jar,屬於實作類別)?不過查看其中的c.tld檔案,標註的版本號碼就是<description>JSTL 1.2 core library</description><display-name>JSTL core</display-name><tlib-version>1.2</tlib-version>也就是說,介面規範的版本還是1.2,1.2.5隻是實現的版本罷了。? JSTL的另一個實現,是在oracle官網上查到的由glassfish提供的,其最新版本也是1.2,而且看日期還是2011年的版本。---------------------------------------------------------- 關於使用方法,在最新版的頁面上有一個readme,基本把問題說清了:LIBRARY?DEPENDENCIES?This?version?of?the?Standard?Tag?Library?has?the?following?runtimedependencies:?? ?1.?Dependencies?provided?by?a?JSP?2.1?container:? ? ? -?Java?1.5?or?later? ? ? -?Servlet?2.5?or?later? ? ? -?JSP?2.1?or?later?? ?2.?Additional?dependencies? ? ? -?The?XML?tag?library?requires?Apache?Xalan?2.7.1?or?later?---Apache?Xalan?2.7.1?To?address?performance?issues?with?XSLT?processing,?this?version?relies?onimplementation?specific?functionality?from?Apache?Xalan.?The?followinglibraries?should?be?included?in?the?classpath?for?your?application:? ?-?xalan-2.7.1.jar? ?-?serializer-2.7.1.jar?---------------------------------------------------------------------------ADD?DEPENDENCIES?TO?A?WEB?APPLICATION?To?use?this?distribution?with?your?own?web?applications,?add?the?following?JARfiles?to?the?‘/WEB-INF/lib‘?directory?of?your?application:? ?-?taglibs-standard-spec-1.2.5.jar? ?-?taglibs-standard-impl-1.2.5.jar? ?-?taglibs-standard-jstlel-1.2.5.jar? ?-?xalan-2.7.1.jar? ?-?serializer-2.7.1.jar?If?you?do?not?use?JSTL?1.0?tags?then?the?"taglibs-standard-jstlel"?JAR?may?beomitted.?If?you?do?not?use?the?XML?library,?then?the?Apache?Xalan?dependenciesmay?also?be?omitted.?If?you?build?you?application?with?Maven,?add?the?following?dependencies?toyour?pom.xml?file:?? ? <dependency>? ? ? <groupId>org.apache.taglibs</groupId>? ? ? <artifactId>taglibs-standard-spec</artifactId>? ? ? <version>1.2.5</version>? ? </dependency>? ? <dependency>? ? ? <groupId>org.apache.taglibs</groupId>? ? ? <artifactId>taglibs-standard-impl</artifactId>? ? ? <version>1.2.5</version>? ? </dependency>?---------------------------------------------------------------------------USING?JSTL?TAGS?FROM?A?JSP?The?JSTL?tag?library?can?be?imported?into?your?pages?with?the?following?directives:?? CORE?LIBRARY? ? <%@?taglib?prefix="c"?uri="http://java.sun.com/jsp/jstl/core"?%>?? XML?LIBRARY? ? <%@?taglib?prefix="x"?uri="http://java.sun.com/jsp/jstl/xml"?%>?? FMT?LIBRARY? ? <%@?taglib?prefix="fmt"?uri="http://java.sun.com/jsp/jstl/fmt"?%>?? SQL?LIBRARY? ? <%@?taglib?prefix="sql"?uri="http://java.sun.com/jsp/jstl/sql"?%>?? FUNCTIONS?LIBRARY

?

? ? <%@?taglib?prefix="fn"?uri="http://java.sun.com/jsp/jstl/functions"?%>

<轉>JSTL標籤庫的版本

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.