struts2常见错误及解决总结
生活随笔
收集整理的這篇文章主要介紹了
struts2常见错误及解决总结
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
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可能為空。查看后臺查詢出來是否有數(shù)據(jù)傳到前臺。總結(jié)
以上是生活随笔為你收集整理的struts2常见错误及解决总结的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: hibernate常见错误及解决方法总结
- 下一篇: Tomcat配置问题解决方法