2011-05-30 57 views
1

顯示從數據庫中的數據,我有一個問題,當我運行page.jsp:問題在JSF

Exception while calling encodeEnd on component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /compteListe.jsp][Class: javax.faces.component.html.HtmlDataTable,Id: j_id_jsp_1879226420_1][Class: javax.faces.component.UIColumn,Id: j_id_jsp_1879226420_2][Class: javax.faces.component.html.HtmlOutputText,Id: j_id_jsp_1879226420_4]} 

造成的:

org.apache.jasper.el.JspPropertyNotFoundException - /compteListe.jsp(29,13) '#{l.Identifiant}' Property 'Identifiant' not found on type com.bankonet.bean.Compte 

但是當我做System.out.println (rs.getString (1)); ...,它運行良好並顯示數據!

回答

2

除非屬性的名稱本身其實有2個大寫字符開頭,在EL屬性名稱必須以小寫,所以:

#{l.identifiant} 

這需要public名稱爲getIdentifiant()的no-arg getter方法。

+0

thx!它運作良好! – V4Vendetta 2011-05-30 19:03:56

+0

不客氣。 – BalusC 2011-05-30 19:10:57

0
org.apache.jasper.el.JspPropertyNotFoundException - /compteListe.jsp(29,13) '#{l.Identifiant}' Property 'Identifiant' not found on type com.bankonet.bean.Compte 

它類com.bankonet.bean.Compte與標準制定者/ getter方法,它沒有找到,因此錯誤

搜索一個場的名稱Identifiant但是當我做的System.out.println (rs.getString(1)); ...,它運行良好,並顯示數據!

它與您的問題無關。你需要通過收集,查看生產視圖