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) -------> JSTL 1.1
在web.xml中使用*2.4.xsd, jsp中url使用*/jsp/jstl/*.
- <?xml version="1.0" encoding="UTF-8"?>
- <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">
- ...
- </web-app>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
2.2 Servlet(2.3) -------> JSTL 1.0
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
- <web-app>
- ...
- </web-app>
- <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
- <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
- <%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
- <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>