`
paladin1988
  • 浏览: 319741 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

【转】jstl与jsp的版本问题:root cause java.lang.NoClassDefFoundError: javax/el/ELException

 
阅读更多

写于2011-08-08 16:39



来源:http://blog.csdn.net/i_buntu/article/details/6407893

 

JSTL1.2

The JSTL 1.2 Maintenace Release aligns with the Unified Expression Language (EL) that is being delivered as part of the JavaServer Pages (JSP) 2.1 specification。JSTL 1.2 is part of the Java EE 5 platform. (from http://java.sun.com/products/jsp/jstl/)

JSTL1.1

Jakarta Taglibs hosts the Standard Taglib 1.1, an implementation of the JSP Standard Tag Library (JSTL), version 1.1, which was developed under the Java Community Process.
NOTE: Standard-1.1 (JSTL 1.1) requires a JSP container that supports the Java Servlet 2.4 and JavaServer Pages 2.0 specifications. Jakarta Tomcat 5 supports the new specifications. The Standard-1.1 taglib has been tested with Tomcat 5.0.3.

JSTL1.0
Standard-1.0 (implementation of the JSTL 1.0 specification) requires a JSP container that supports the Java Servlet 2.3 and JavaServer Pages 1.2 specifications. Jakarta Tomcat 4 supports these specifications. The Standard 1.0 taglib has been tested with Tomcat 4.1.24. (from http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html)

Tomcat6 实现了servlet 2.5 和JSP2.1的规范,可以支持JSTL1.2;

而Tomcat5实现了 servlet 2.4 和JSP2.0的规范,只能支持JSTL1.1

所以,只要使用JSTL1.1(standard-1.1.jar和jstl-1.1.jar)替换JSTL1.2(jstl-1.2.jar)即可在Tomcat5下正常运行!

另外,web.xml必须指定使用servlet 2.4 和JSP2.0的规范:
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

 

 

jstl 1.1 c标签引入:http://java.sun.com/jsp/jstl/core

jstl 1.0 c标签引入: http://java.sun.com/jstl/core

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics