1. struts-html.tld已经拷贝到了WEB-INF目录下
2. 在web.xml中配置如下:<jsp-config> 
<taglib> 
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> 
<taglib-location>/WEB-INF/struts-html.tld</taglib-location> 
</taglib> 
</jsp-config>问题是我在jsp页面中输入:<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>就会报错
错误信息为:Cannot find the tag library descriptor for /WEB-INF/struts-html.tldps:网上有人说把<jsp-config> </jsp-config> 标记去掉 
其他<taglib> </taglib> 写在</web-app>之前 
我试过,不管用 
 

解决方案 »

  1.   

    既然struts-html.tld已经拷贝到了WEB-INF目录下了,taglib标签不要在web.xml配置文件中配置的,
    在jsp中用的时候直接:<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>就可以了,
    其中uri的值是struts-html.tld文件中<uri>http://struts.apache.org/tags-html</uri>标签中的值
      

  2.   

    出现这个错误:Cannot find the tag library descriptor for /WEB-INF/struts-html.tld struts-html.tld 也拷到WEB-INF下了么?  
    试验下把<jsp-config> </jsp-config> 标记去掉 
    其他<taglib> </taglib> 写在</web-app>之前 要是楼主机器能上网
    也可以使用1楼朋友说的
    在jsp中用的时候直接: <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>就可以了, 
    其中uri的值是struts-html.tld文件中 <uri>http://struts.apache.org/tags-html </uri>标签中的值
    uri="http://struts.apache.org/tags-html",这样就可以这两种方法都可以,楼主试试