美文网首页
mavan(迭代器报错)

mavan(迭代器报错)

作者: 山不转人自转 | 来源:发表于2019-03-06 13:57 被阅读0次

    异常报错处理:

    The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

    迭代器需求:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

     <!-- JSTL -->
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency>
    <!-- JSTL实现包 -->
    <dependency>
        <groupId>org.apache.taglibs</groupId>
        <artifactId>taglibs-standard-impl</artifactId>
        <version>1.2.5</version>
    </dependency>
    

    解压实现包“taglibs-standard-impl-1.2.5.jar”,在META-INF拿一个tld文件,其实一个就够用了


    image.png

    然后web.xml里配置jsp-config

        <jsp-config>
            <!-- 配置c描述文件-对应c标签,这里的taglib-uri对应jsp中引入的uri -->
            <taglib>
                <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
                <taglib-location>/WEB-INF/lib/c.tld</taglib-location>
            </taglib>
        </jsp-config>
    

    相关文章

      网友评论

          本文标题:mavan(迭代器报错)

          本文链接:https://www.haomeiwen.com/subject/nomtpqtx.html