I want to acces to an attribute inherited by one of my java classes, in a jsp using jstl 1.2 :
Java :
public class LigneDeclarationBean {
private ELigneDeclaration ligneDecla;
private ETypeFormulaire typeForm;
...
public ELigneDeclaration getLigneDecla() {
return ligneDecla;
}
public class ELigneDeclaration extends ZELigneDeclaration implements Serializable {
...
}
public class ZELigneDeclaration implements Serializable {
private String sLibelle;
...
public String getSLibelle() {
return sLibelle;
}
}
JSP :
<%
List<LigneDeclarationBean> listelignes = (List) request.getAttribute("listeLignes");
// Affichage de la liste des ligneDeclas
for (int i = 0; i < listelignes.size(); i++) {
LigneDeclarationBean ligneDecla = listelignes.get(i);
%>
${ligneDecla.ligneDecla.sLibelle}
The error message :
message: The class 'package.ELigneDeclaration ' does not have the property 'sLibelle'.
However in scriptlet it works fine
<%=ligneDecla.getLigneDecla().getSLibelle()%>
return the right value. Is this a limitation of the jstl?
Is there another way to acces to my attribute using this taglib? This project do not use a presentation framework and jstl seems to be the only taglibs I could use.