jstl标签库无提示解决方案

在自建的springmvc项目中,当想在jsp页面使用fmt标签库和核心标签库的时候,系统提示我Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core,百度后发现,该问题是由与没有引入标签库的jar文件导致的。经过搜索最终发现解决方案如下:

1.从Apache的标准标签库中下载相关jar包(jakarta-taglibs-standard-1.1.2.zip下载地址

2.将jakarta-taglibs-standard-1.1.2/lib/下的两个jar文件:standard.jar和jstl.jar文件拷贝到/WEB-INF/lib/下。

3.配置Web.xml文件,如下:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" 
    xmlns="http://java.sun.com/xml/ns/j2ee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	<jsp-config>
	<taglib>
	<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
	<taglib-location>/WEB-INF/fmt.tld</taglib-location>
	</taglib>
	<taglib>
	<taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
	<taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
	</taglib>
	<taglib>
	<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
	<taglib-location>/WEB-INF/c.tld</taglib-location>
	</taglib>
	<taglib>
	<taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
	<taglib-location>/WEB-INF/c-rt.tld</taglib-location>
	</taglib>
	<taglib>
	<taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
	<taglib-location>/WEB-INF/sql.tld</taglib-location>
	</taglib>
	<taglib>
	<taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
	<taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
	</taglib>
	<taglib>
	<taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
	<taglib-location>/WEB-INF/x.tld</taglib-location>
	</taglib>
	<taglib>
	<taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
	<taglib-location>/WEB-INF/x-rt.tld</taglib-location>
	</taglib>
	</jsp-config>
</web-app>

按照上文中的方法最终能够在页面中成功解决问题。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值