日期:2014-05-17  浏览次数:20663 次

struts2的property标签,遇到Attribute id invalid for tag property according to TLD
如题,在jsp里面写的是:<s:property id="currentpage"value="currentpage" /> ,已经引入了<%@ taglib uri="/struts-tags" prefix="s"%>,但是对id报错,在myeclipse里面直接就报错,Undefined attribute name "id",运行后报错:Attribute id invalid for tag property according to TLD 。后来把id去掉,直接用value获取值也是可以的,但为什么加上id会报错呢?

------解决方案--------------------
<s:property id="currentpage">
struts2本身就有回显功能,不用加value也可以的
------解决方案--------------------
探讨

Attribute id invalid for tag property according to TLD
就是property这个标签没有id这个属性