No object in the CompoundRoot has a publicly accessible property named

时间:2023-03-08 23:58:53
No object in the CompoundRoot has a publicly accessible property named

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方法