开发者

Problem in displaying data from database in JSF

开发者 https://www.devze.com 2023-03-09 01:12 出处:网络
i have a problem when i run a page.jsp : Exception while calling encodeEnd on component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /compteListe.jsp][Class: javax.faces.compo

i have a problem when i run a page.jsp :

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]}

Caused by:

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

but when i do System.out.println (rs.getString (1));..., it works 开发者_JAVA技巧well and displays data !!


Unless the property name itself actually starts with 2 uppercased characters, the property name in EL needs to start with lowercase, so:

#{l.identifiant}

This requires a public no-arg getter method with name getIdentifiant().


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

It searches for a Field with name Identifiant in class com.bankonet.bean.Compte with standard setter/getter methods , which it doesn't find and so the error

but when i do System.out.println (rs.getString (1));..., it works well and displays data !!

It doesn't relate to your problem. You need to pass a collection to view to produce view

0

精彩评论

暂无评论...
验证码 换一张
取 消