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" %>

 

posted on 2012-08-30 10:57  小强斋太  阅读(2647)  评论(1编辑  收藏  举报

导航