日期:2014-05-18  浏览次数:20694 次

问个关于标签的问题
在标签那个类中有   String   xs这个属性
为什么我在编译的时候报下面这个错误,而且,我在类中是定义了关于xs这个属性的set方法的

Translation   of   /WEB-INF/jsp/common/changeObject.jsp   failed:   (line   5):   Error   in   using   tag   library   uri= '/WEB-INF/hualong-tag.tld '   prefix= 'hualong ':   The   Tag   class   'com.hualong.treeview.TreeControlTag '   has   no   setter   method   corresponding   to   TLD   declared   attribute   'xs ',   (JSP   1.1   spec,   5.4.1)


------解决方案--------------------
配置tld文件没?
------解决方案--------------------
代码,还有TLD拿出来看
------解决方案--------------------
把setter方法放在类的最上面试试!
------解决方案--------------------
继承BodyTagSupport类的自定义标签类中属性需要有get和set方法
如果你想要看例子请到我的blog(http://blog.csdn.net/cao_david/)上去看“jsp使用自定义标签taglib分页系列”所以代码我都公开了