java中jsp页面使用jstl标签
高洛峰
高洛峰 2017-04-17 15:30:23
[Java讨论组]

为什么使用在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)
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

全部回复(1)
ringa_lee
  • 复制一个 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> 
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号