The requested list key could not be resolved as a collection。。。。
2012-09-29 22:44
495 查看
这个问题我查了好半天,最后看到的是在显示
表单之前先进入action
即
而我之前写的是
所以会出现
The requested list key 'sports' could not be resolved as a collection/array/这样错误,应为struts不知道sports是什么,也就是没通过getSports()获得
<%@page contentType="text/html;charset=gbk"%> <%@taglib prefix="s" uri="/struts-tags"%> <html> <body> <s:form action="edit"> <s:select key="personBean.sport" list="sports" /> <s:submit /> </s:form> </body> </html>
表单之前先进入action
即
<action name="select" class="com.yuxuan.EditAction"><result>/jsp/information.jsp</result></action>
而我之前写的是
<action name="select" ><result>/jsp/information.jsp</result></action>
所以会出现
The requested list key 'sports' could not be resolved as a collection/array/这样错误,应为struts不知道sports是什么,也就是没通过getSports()获得
相关文章推荐
- The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or peopl
- Select标签出现了The requested list key 'noticeType' could not be resolved as a collection/array/map/enume
- The requested list key '#request.localprovi' could not be resolved as a collection/array/map/enumera
- The requested list key 'list' could not be resolved as a collection/array/map/enumeration/iterator t
- The requested list key 'deptList' could not be resolved as a collection/array/map/enumeration/iterat
- The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator ty
- tag 'select', field 'list', name 'did': The requested list key '#id' could not be resolved as a c
- 关于struts2的checkboxlist、select等标签发生could not be resolved as a collection/array/map/enumeration/iterat
- 关于struts2的checkboxlist、select等标签发生could not be resolved as a collection/array/map/enumeration/iterat
- 关于struts2的checkboxlist、select等标签发生could not be resolved as a collection/array/map/enumeration/iterator type异常的记录
- 关于struts2的checkboxlist、select等标签发生could not be resolved as a collection/array/map/enumeration/iterator type异常的记录
- <s:doubleselect 的使用-不支持EL表达式,需要使用OGNL来动态赋值-could not be resolved as a collection/array/map/enumerati
- The requested list key 'modules' could not be resolved as a collection/array/map/enumeration/iterator
- Claims系列 - ID4036错误(The key needed to decrypt the encrypted security token could not be resolved from the following security key identifier)
- 报错处理:could not be resolved as a collection/array/map/enumeration/iterator type
- 项目报错:tag 'select', field 'list', name 'factory.id': The requested list key '#factoryList' could not
- Struts2 :could not be resolved as a collection/array/map/enumeration/iterator type
- could not be resolved as a collection/array/map/enumeration/iterator type的异常处理
- could not be resolved as a collection/array/map/enumeration/iterator type异常的记录
- The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or peopl .