1.下載jar文件 http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/

2.解壓后找到lib目錄下的jstl.jar和standard.jar文件,且復(fù)制到tomcat的lib目錄下
3.在eclipse構(gòu)建路徑下添加外部jar文件。

4.在項(xiàng)目WebContent/WEB-INF/web.xml文件中添加配置
<jsp-config> <taglib> <taglib-uri>http://java.sun.com/jstl/core</taglib-uri> <taglib-location>/WEB-INF/c.tld</taglib-location> </taglib> </jsp-config>
5.新建jsp文件
<%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE html> <html> <head> <meta charset="GB18030"> <title>JSTL</title> </head> <body> <c:out value="asda"></c:out> </body> </html>
運(yùn)行后結(jié)果如下

浙公網(wǎng)安備 33010602011771號(hào)