No object in the CompoundRoot has a publicly accessible property named

来源:互联网 发布:js设置option选中 编辑:程序博客网 时间:2024/06/10 19:00
No object in the CompoundRoot has a publicly accessible property named 'typeid' (no setter could be found)
在设置struts的devMode为true后 出现上述异常

原因就是devMode下form中的input会在action中找针对input name的setter
(struts.devMode = false,设置为true时,所有有名字(name)的input都必须
有对应的setter,无论是input为hidden设置的隐藏域还是通过url传的参数值)

解决方法就是注掉devMode true
或者为参数值设置set,get方法
原创粉丝点击