[JSTL] Erreur d acces aux attributs d un bean
Bonjour,
J'ai un problème que je n'arrive pas a résoudre en le retournant dans tous les sens :
Pour tester dans ma jsp je fais une boucle JAVA qui fonctionne :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
<%
PrevBeneficiaire benef = (PrevBeneficiaire)request.getSession().getAttribute("info_adherent");
Set test = benef.getBenFicheInvalBase().getArretDateDebut();
Iterator testit = test.iterator();
while(testit.hasNext())
{
PrevFicheInvalArret arr = (PrevFicheInvalArret)testit.next();
System.out.println(" "+arr.getArretDateDebut());
%>
<%=arr.getArretId() %>
<% }
%> |
Alors que ma boucle JSTL qui fait exactement la même chose plante :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
<c:forEach var="arretVar" items="info_adherent.benFicheInvalBase.invalArrets">
<html:form action="/autre.jspa">
<% System.out.println("BOUCLE 1"); %>
<tr>
<td><fmt:formatDate pattern="dd/MM/yyyy" value="${arretVar.arretDateDebut}" /></td>
<td><fmt:formatDate pattern="dd/MM/yyyy" value="${arretVar.arretDateFin}" /></td>
<td> <c:out value="${arretVar.arretObjet}" /></td>
<html:hidden name="arretVar" property="${arretVar.arretId}"/>
<html:hidden name="info_adherent.benFicheInvalBase" property="ficheId"/>
<td><html:submit styleClass="boutonArret" value=" " /></td>
</tr>
</html:form>
</c:forEach> |
Exception :
Citation:
javax.servlet.ServletException: An error occurred while evaluating custom action attribute "value" with value "${arretVar.arretDateDebut}": Unable to find a value for "arretDateDebut" in object of class "java.lang.String" using operator "." (null)
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.prevoyance.fichessuivi.visuFicheInval_jsp._jspService(org.apache.jsp.prevoyance.fichessuivi.visuFicheInval_jsp:295)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
Je ne comprends plus rien !