java中jsp页面使用jstl标签

 用户x735b8j5iu 发布于 2022-11-02 07:37

为什么使用在jsp中使用jstl标签项目下有jstl的jar包发布到Tomcat上也有jar为什么还是报下面的错啊?求解,纠结很久了,谢谢
type Exception report

message 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

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: 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

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
1 个回答
    • 复制一个 jstl.jar 和 standard.jar 包到 WEB-INF/lib 下。

    • 把 tld 文件的目录也复制到 WEB-INF 中

    修改 web.conf,配置 taglib:

    <jsp-config> 
       <taglib> 
        <taglib-uri>http://java.sun.com/jsp/jstl/core<;/taglib-uri> 
        <taglib-location>/WEB-INF/c.tld</taglib-location> 
       </taglib> 
    
       <taglib> 
        <taglib-uri>http://java.sun.com/jsp/jstl/xml<;/taglib-uri> 
        <taglib-location>/WEB-INF/x.tld</taglib-location> 
       </taglib> 
    
       <taglib> 
        <taglib-uri>http://java.sun.com/jsp/jstl/fmt<;/taglib-uri> 
        <taglib-location>/WEB-INF/fmt.tld</taglib-location> 
       </taglib> 
    
       <taglib> 
        <taglib-uri>http://java.sun.com/jsp/jstl/sql<;/taglib-uri> 
        <taglib-location>/WEB-INF/sql.tld</taglib-location> 
       </taglib> 
    </jsp-config> 
    2022-11-04 06:46 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有