错误信息分析:
tag 'select', field 'list', name 'dept.id': The requested list key 'deptList' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
从提示信息中可以得到:
jsp页面的deptList没有从web层获得到数据:
<s:select name="dept.id" list="deptList"
listKey="id" listValue="deptName"
headerKey="" headerValue="--请选择--"
></s:select>
第一种可能:传递参数的这个userAction中没有注入deptService,或者是传参的到此jsp的web层方法中没有调用deptService中的查询方法。
第二种可能:排除第一种意外之后,就是可能对应的Spring 配置文件中没有为此UserAction 中注入deptService.
以上就是我对此问题的分析。