javax.el.PropertyNotFoundException: Property 'XXX' not readable
使用spring框架,自己組裝了一個資訊搭載類扔到JSP中渲染,大致是這樣:
UserBasicInfo userInfo = new UserBasicInfo(user);
以及
<img id="user_avatar" src="${userInfo.avatar}" class="img-responsive col-md-6" alt="使用者頭像"/>
這時候執行時就會出現標題中的錯誤,UserBasicInfo是pojo,是放在UserController.java中的一個非public類。試過把他做成bean仍會有這個錯誤,之後考慮spring是使用代理來做這些事情的,預設訪問許可權的類spring可能訪問不到,就把這個類單獨做成一個檔案做成public的,問題解決。
相關推薦
javax.el.PropertyNotFoundException: Property 'XXX' not readable
使用spring框架,自己組裝了一個資訊搭載類扔到JSP中渲染,大致是這樣: UserBasicInfo userInfo = new UserBasicInfo(user); 以及 <img id="user_avatar" src="${
【java學習筆記】踩坑記錄,異常:javax.el.PropertyNotFoundException: Property [XXX] not found on type [XXX.XXX.XXX.XXX]
練習JavaWeb專案時,報錯javax.el.PropertyNotFoundException,原因是EL表示式裡面的屬性和pojo裡面的屬性名字沒有對上,範了個低階錯誤。 jsp中: <li>歡迎您,${loginUser.username}!</li> pojo
對與幾種javax.el.PropertyNotFoundException: Property 'XXX' not found on type java.lang.String問題原因
我最近在做一個專案時,點選連結tomcat報錯 “javax.el.PropertyNotFoundException: Property 'XXX' not found on type java.lang.String” 這樣的錯誤,然後我百度上去搜了一下,發現原因五花八
javax.el.PropertyNotFoundException: Property 'XXX' not found on type bean.XXXXX
遇到的問題: 在使用Eclipse開發Java Web時,呼叫DAO和Java Bean出現瞭如下錯誤: 嚴重: Servlet.service() for servlet [com.servlet.queryServlet] in context with path [
javax.el.PropertyNotFoundException: Property 'phone' not found on type xxx.xxx.domain
報錯資訊如上! 原因:我的Student類裡面定義的變數與JSP中EL裡面的屬性名稱不一致。 詳情:我把Student類中定義的變數改成與JSP中的屬性一致了,但還是會報這個錯誤。排除一切可能的錯誤後還是報錯。沒辦法,這時候就要看編譯器是不是出問題了,然後重啟了Ecl
javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String 錯誤解決辦法
javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String javax.el.BeanELResolver$BeanProperties.get(Bean
使用jstl標籤遍歷資料時,報javax.el.PropertyNotFoundException: Property [id] not found on type [java.lang.String
後臺報錯資訊: javax.el.PropertyNotFoundException: Property [id] not found on type [java.lang.String] at javax.el.BeanELResolver$Bean
javax.el.PropertyNotFoundException: Property 'id' not found on type java.lang.Integer
nim osi ren worker lan servlet encoding site filter javax.el.PropertyNotFoundException: Property ‘id‘ not found on type java.lang.Integer
HTTP Status 500 - javax.el.PropertyNotFoundException: Property 'lkmId' not found on type cn.itcast.entity.LinkMan
報錯 type Exception report message javax.el.PropertyNotFoundException: Property 'lkmId' not found on type cn.itcast.entity.LinkMan description
EL表示式:Property 'id' not readable on type int
錯誤資訊:Property ‘id’ not readable on type int,如下圖: 前面為了偷懶,User實體類直接寫在了Controller裡, 所以User沒有Publi
JSTL表示式錯誤PropertyNotFoundException: Property 'title' not found on type java.lang.String
低階錯誤!!! 異常: PropertyNotFoundException: Property 'title' not found on type java.lang.String 解釋:屬性找不到異常:屬性title找不到 查詢資料庫正常,出現錯誤原因是jstl表示式書
EL表示式中的 javax.el.PropertyNotFoundException 分析
1. javax.el.PropertyNotFoundException 一種可能,你太累了,寫錯了表示式,比如 嚴重: Servlet.service() for servlet jsp threw exception javax.el.Proper
報錯javax.el.ELException: Function ':empty' not found;
開發時在windows 系統下 TOMCAT 7。0 JSP中的 這段程式碼<c:if test="${empty(tjmap[tvm.id])}"> 沒有問題, 但是到Linux測試環境下就報錯 javax.el.ELException: Functio
關於報:No typehandler found for property XXX `updatetime` timestamp NOT NULL -----的解決方法
出了問題不可怕,要勇於面對面對問題,首先你的弄明報報的錯是啥意思 No typehandler found for property XXX:的意思就是說沒有為屬性XXX找到對應的匹配欄位 也就是說對映的時候出現了問題 一般情況下我們會看以下三個地方 1.XML檔案:檢視實體
解決lateinit property xxx has not been initialized
我一開始在companion object 中定義類變數 lateinit var countDownTimer: CountDownTimer 懶載入的變數是在沒初始化之前是不允許做判空操作的,要先判斷是否初始化 然後用的時候發現做了判斷是否初始化是報錯的 解決方案是在定義的
javafx error --- Can not retrieve property 'xxx' in PropertyValueFactory
在javafx中使用表格時,將TableColumn與自己建立的類的某個欄位繫結時出現的問題,自建類定義如下: class RankRecord{ private final SimpleIntege
Typescript error :Property 'xxx' does not exist on type 'yyy'.
問題: Typescript error :Property mozRequestFullScreen' does not exist on type 'HTMLElement'. 其他類似問題:property 'xxx' does not exist on typ
vue2.0:Can not read property ‘XXX’ of undefined
問題描述:在vue2環境下:頁面爆出標題的錯誤,但是頁面的資料和方法正常渲染和使用,沒有任何異常。 解決辦法: ①定義非同步請求資料的完整格式 ②頁面使用該資料時,使用v-if進行判斷一下 問題分析: 當你的頁面中渲染的時候,created的資料肯定是
Bean property 'xxx' is not writable or has an invalid setter method
直接翻譯就是 名稱為“xxx”的bean不能進行寫操作或者有一個無效的setter方法 Bean property 'xxx' is not writable or has an invalid setter method. Did you mean 'xx
關於EL表示式的原理以及提示Property 'xx' not found on 原因
EL表示式獲取物件屬性的原理是這樣的:以表示式${user.name}為例EL表示式會根據name去User類裡尋找這個name的get方法,此時會自動把name首字母大寫並加上get字首,一旦找到與之匹配的方法,El表示式就會認為這就是要訪問的屬性,並返回屬性的值。