---
title: "JSTL 版本选择 2.4&2.3"
author: "sandy_leen"
date: "2011-05-26T11:25:17Z"
tags: []
categories: ["编程语言"]
slug: "jstl-2-4-2-3"
draft: false
lastmod: "2011-05-26T11:25:17Z"
id: 1059343
url: "https://chenlinbo.iteye.com/blog/1059343"
---

**1.  Servelt / JSP/JSTL / Java/Tomcat** Version

 

Servlet    JSP      JSTL    Java   Tomcat 2.5    2.1    1.2     5.0     6.0.x 2.4    2.0    1.1     1.4     5.5.x 2.3    1.2    1.0     1.2     4.1.x

 

 

**2.  Servlet/JSTL**

 

    2.1  Servlet(2.4)   -------&gt;  JSTL 1.1

    在web.xml中使用\*2.4.xsd， jsp中url使用\*/jsp/jstl/\*.

 

Html代码  [![收藏代码](http://jnh.iteye.com/images/icon_star.png)](http://jnh.iteye.com/blog/457119 "收藏这段代码")

1. &lt;?xml version="1.0" encoding="UTF-8"?&gt;
2. &lt;web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4. xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
5. http://java.sun.com/xml/ns/j2ee/web-app\_2\_4.xsd"&gt;
6. ...
7. &lt;/web-app&gt;

 

Html代码  [![收藏代码](http://jnh.iteye.com/images/icon_star.png)](http://jnh.iteye.com/blog/457119 "收藏这段代码")

1. &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %&gt;
2. &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %&gt;
3. &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %&gt;
4. &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %&gt;
5. &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %&gt;

 

 

   2.2  Servlet(2.3)  -------&gt;  JSTL 1.0

 

Html代码  [![收藏代码](http://jnh.iteye.com/images/icon_star.png)](http://jnh.iteye.com/blog/457119 "收藏这段代码")

1. &lt;?xml version="1.0" encoding="UTF-8"?&gt;
2. &lt;!DOCTYPE web-app
3. PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
4. "http://java.sun.com/dtd/web-app\_2\_3.dtd"&gt;
5. &lt;web-app&gt;
6. ...
7. &lt;/web-app&gt;

 

Html代码  [![收藏代码](http://jnh.iteye.com/images/icon_star.png)](http://jnh.iteye.com/blog/457119 "收藏这段代码")

1. &lt;%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %&gt;
2. &lt;%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %&gt;
3. &lt;%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %&gt;
4. &lt;%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %&gt;