1. Download the DTD file of the JSTL tag library
Download address: http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/jakarta-taglibs-standard-1.1.2.zip
2. After decompression, find the standard.jar and jstl.jar files in the lib directory, copy the files, and paste them into your WEB_INF/lib directory as shown in the figure
Can be solved: org.apache.jasper.JasperException: Unable to load class for JSP
2. The first step will allow you to use the jstl tag, but idea will still report an error because it does not recognize this tag, so it needs to be added in the settings.
Select File―>SettingSettingSites―->Schemas and DTDs under Setting, click + in the External Schemas and DTDs box on the right, and then fill in http://java.sun.com/jsp/jstl/core in the URI. Find the c.tld file in the tld directory of the unzipped file in explorer, and select, and at this point, you can end the problem that idea does not recognize jstl
Then it's ready to use.
jsp page using tag library
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
test
<body><c:set value="wolfy" var="username" scope="request"></c:set>${username}</body>The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.