ognl.NoSuchPropertyException(沒有對應屬性異常)
警告: Error setting expression 'user.username' with value '[Ljava.lang.String;@6dc63791'
ognl.NoSuchPropertyException: com.shengxian.entity.User.username
異常原因:
賬號:<input type="text" name="user.username"/></br>
我在表單中給一個對象的username屬性賦值,但是它沒有這個屬性,屬性名寫錯了,應該爲name,但是頁面能繼續執行跳轉。
解決辦法:
把jsp中錯誤的屬性名改成正確的程序運行正常
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No result defined for action com.shengxian.action.LoginAction and result
異常原因:
頁面中:
HTTP Status 404 - No result defined for action com.shengxian.action.LoginAction and result
Action中返回一個字符串,但是在xml中沒有規定這個字符串要跳轉的頁面或action
解決辦法:
在xml中寫關於這個跳轉對應的result的name值和跳轉內容