值栈显示问题(高版本要求属性为public(有些标签要求有变化))
报错:
<s:select ,<s:checkList struts标签
tag 'select', field 'list'The requested list key 'qTypes' could not be resolved as a collection/array/map/enumeration/iterator type
这种问题:
1,高版本的struts标签<s:select> 中的list要求不为null
public List<DicContentEntity> approveStatusList = new ArrayList<DicContentEntity>();
加set get
2,一般是后台属性是private,而get,set方法是public,此时应该把属性改为public
<s:debug>可以直接看到只要有属性有这种问题都会显示
Class: ognl.ObjectPropertyAccessor
File: ObjectPropertyAccessor.java
Method: getProperty
Line: 151 - ognl/ObjectPropertyAccessor.java:151:-1
com.opensymphony.xwork2.ognl.OgnlReflectionProvider.getBeanMap(OgnlReflectionProvider.java:98)
private List<ZJQuestionTypeBean> qTypes=new ArrayList<ZJQuestionTypeBean>(); public List<ZJQuestionTypeBean> qTypes=new ArrayList<ZJQuestionTypeBean>();
public List<ZJQuestionTypeBean> getqTypes() {
return qTypes;
}
public void setqTypes(List<ZJQuestionTypeBean> qTypes) {
this.qTypes = qTypes;
}