V4Vendetta
V4Vendetta

Reputation: 21

Problem in displaying data from database in JSF

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 well and displays data !!

Upvotes: 1

Views: 3359

Answers (2)

BalusC
BalusC

Reputation: 1109625

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().

Upvotes: 2

Jigar Joshi
Jigar Joshi

Reputation: 240966

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

Upvotes: 0

Related Questions