Struts 调用数组出现错误,请帮忙
在Struts的form里定义:
private int[] iDocSelect = new int[18];
......
public int[] getIDocSelect() {
return iDocSelect;
}
public void setIDocSelect(int[] docSelect) {
iDocSelect = docSelect;
}
......
在jsp页面调用:
<c:if test="${lcImportForm.iDocSelect[1]==1}">123</c:if>
提示错误:
javax.servlet.jsp.JspTagException: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "test" with value "${lcImportForm.iDocSelect[1]==1}": Unable to find a value for "iDocSelect" in object of class "com.longtop.lcImport.web.LcImportForm" using operator "." (null) at org.apache.taglibs.standard.tag.el.core.IfTag.condition(IfTag.java:102) at ...