2011-05-30 53 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)); ...,它运行良好,并显示数据!

它与您的问题无关。你需要通过收集,查看生产视图