struts2常见错误及解决总结

来源:互联网 发布:回收珠宝的软件 编辑:程序博客网 时间:2024/06/04 19:33

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表单下不要用<input type=”hidden”/> 而是用<s:hidden name =   “userID”value=””/>
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可能为空。查看后台查询出来是否有数据传到前台。
0 0
原创粉丝点击