1.下载jar文件 http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/
2.解压后找到lib目录下的jstl.jar和standard.jar文件,且复制到tomcat的lib目录下
3.在eclipse构建路径下添加外部jar文件。
4.在项目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>
运行后结果如下
原文:https://www.cnblogs.com/sky-zn/p/12461128.html