下面是jstl官方文档中的一句话:
JSTL 1.1 requires a JSP 2.0 container. We recommend you test the Standard Taglib with Tomcat 5.x. JSTL 1.0 only required a JSP 1.2 container
即:jstl 1.1需要jsp 2.0的WEB容器。推荐测试标准标签用tomcat 5.x版本。jstl 1.0只需要jsp 1.2的WEB容器。
如何看自己的jsp WEB容器版本呢?
一般情况下,tomcat(5.x)的commom/lib下有jsp-api.jar和servlet-api.jar打开, 用文本编辑器打开其中的 MANIFEST.MF文件,例如我的内容如下:
jsp的如下:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2-b28 (Sun Microsystems Inc.)
Name: javax/servlet/jsp/
Specification-Title: Java API for JavaServer Pages
Specification-Version: 2.0
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet.jsp
Implementation-Version: 2.0.public_draft
Implementation-Vendor: Apache Software Foundation
即为2.0的;
servlet如下:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2-b28 (Sun Microsystems Inc.)
Name: javax/servlet/
Specification-Title: Java API for Servlets
Specification-Version: 2.4
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet
Implementation-Version: 2.4.public_draft
Implementation-Vendor: Apache Software Foundation
即为2.4滴