struts2常见错误及解决总结

Struts2异常

1、ognl.MethodFailedException: Method "setUserID" failed for object User [userID=0,  userName=null, logonName=admin, logonPwd=admin, sex=null, birthday=2016-09-15,  education=, telephone=18370875241, interest=, path=null, filename=null, remark=,    isUpload=null] [java.lang.NoSuchMethodException:    org.sihai.user.domain.User.setUserID([Ljava.lang.String;)]

解决:
在form表单下不要用type=”hidden”/> 而是用
2、java.lang.RuntimeException: Invalid action class configuration that references an unknown class named [userAction]

解决:
需要配置input视图
3、The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or peopl .

解决:
List可能为空。查看后台查询出来是否有数据传到前台。

你可能感兴趣的:(√,stucts)