Struts2---->Cannot find the tag library descriptor for /struts-tags

以前的的项目,导入,引用struts2标签的jsp页面

<%@ taglib prefix="s" uri="/struts-tags" %>

报错Cannot find the tag library descriptor for /struts-tags

struts-tags 是struts2标签库默认的URI,

解决方法:

1、修改下jsp文件(哪怕打一个空格,再删掉啊),保存,错误就消失了。估计本来没错误,是myeclipse验证的错误

以下是网上的方法:我试了,第二种有效。

2、把struts2-core-2.3.1.2.jar的包放在WEB-INF/lib下面错误就消失了

3、 struts2标签自动提示功能(解决struts2标签出现红叉)

1 把struts2包中的struts-tags.tld提取出来,放入本地硬盘上,

2 eclipse--window--xml catalog,点Add ,URI 项输入/struts-tags ,Local Path项输入本地硬盘struts-tags.tld的位置,点OK ,重启eclipse 。

 

在工程中使用struts2标签

一、 struts2标签定义文件在struts2-core-2.0.11.1META-INF 下面,文件名为struts-tags.tld

二、在JSP中使用taglib编译指令导入标签库 <%@ taglib prefix="s" uri="/struts-tags" %>

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值