<%@ taglib prefix=“c“ uri=“http://java.sun.com/jsp/jstl/core“ %>報錯

w_1106發表於2020-11-02

<%@ taglib prefix=“c” uri=“http://java.sun.com/jsp/jstl/core” %>報錯

在用到JSTL標籤,程式碼中含有<%@ taglib prefix=“c” uri=“http://java.sun.com/jsp/jstl/core” %>時,有可能會遇到這樣的問題:

Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core”

一般的原始是缺少兩個Jar包:jstl.jar和standard.jar(包的下載地址:http://download.csdn.net/detail/candyo75/8393941)

如果還不行,請調整jstl.jar 版本。增加如下

<font size=3><jsp-config> 
        <taglib> 
            <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri> 
            <taglib-location>/WEB-INF/tlds/fmt.tld</taglib-location> 
        </taglib> 
        <taglib> 
            <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri> 
            <taglib-location>/WEB-INF/tlds/fmt-rt.tld</taglib-location> 
        </taglib> 
        <taglib> 
            <taglib-uri>http://java.sun.com/jstl/core</taglib-uri> 
            <taglib-location>/WEB-INF/tlds/c.tld</taglib-location> 
        </taglib>  
</jsp-config>

相關文章