标签不能使用的两种解决办法

xiaoxiao2026-05-06  2

第一种: 将标签库文件(*.tld)放到 META -INF/ tlds / 目录下,tlds文件夹需要自己手动创建

 

 

第二种:

修改web.xml,由于版本下同具体格式详见dtd <taglib> <taglib-uri>http://struts.apache.org/tags-bean</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://struts.apache.org/tags-html</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://struts.apache.org/tags-logic</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://struts.apache.org/tags-nested</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://struts.apache.org/tags-tiles</taglib-uri> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location> </taglib>

 

总结:个人认为第一种较好,避免web.xml文件过大,但要注意tld文件的位置

 

 

 

相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-5048293.html

最新回复(0)