Bonjour
environnement windows
pas d'IDE : juste ultra edit et ant pour compiler
tomcat 5.5.9
voilà mon probleme j'essaie d'utiliser la balise logic iterate
voici le code de ma JSP
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <logic:iterate id="listeEquipe" name="listeTeam" > <tr> <td><bean:write name="listeEquipe" property="Team._rank"/></td> <td><bean:write name="listeEquipe" property="Team._teamName"/></td> <td><bean:write name="listeEquipe" property="Team._points"/></td> <td><bean:write name="listeEquipe" property="Team._played"/></td> <td><bean:write name="listeEquipe" property="Team._win"/></td> <td><bean:write name="listeEquipe" property="Team._draw"/></td> <td><bean:write name="listeEquipe" property="Team._loose"/></td> <td><bean:write name="listeEquipe" property="Team._forward"/></td> <td><bean:write name="listeEquipe" property="Team._against"/></td> <td><bean:write name="listeEquipe" property="Team._difference"/></td> </tr> </logic:iterate>
dans ma classe Action je fais
où listeTeam est en fait une liste d'objet Team
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 request.setAttribute("listeTeam",listeTeam);
et dans ma classe Team je fais
et enfin mon code erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 package com.germany.objets; import org.apache.struts.action.ActionForm; public class Team extends ActionForm { private String _teamName = ""; private int _rank = 0; private int _points = 0; private int _played = 0; private int _loose = 0; private int _win = 0; private int _draw = 0; private int _forward = 0; private int _against = 0; private int _difference = 0; public Team(){} public Team(String nom_,int rank_,int points_,int played_,int loose_,int win_,int draw_,int forward_,int against_,int difference_){ this._teamName = nom_; this._rank = rank_; this._points = points_; this._played = played_; this._loose = loose_; this._win = win_; this._draw = draw_; this._forward = forward_; this._against = against_; this._difference = difference_; } public String getTeamName(){ return this._teamName; } public void setTeamName(String teamName_){ this._teamName=teamName_; } public int getPoints(){ return this._points; } public void setPoints(int points_){ this._points=points_; } //etc je fais pareil avec tous les attributs }
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 javax.servlet.ServletException: No getter method for property: "Team._rank" of bean: "listeEquipe" org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781) org.apache.jsp.jsp.groupResult_jsp._jspService(org.apache.jsp.jsp.groupResult_jsp:212) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) cause mère javax.servlet.jsp.JspException: No getter method for property: "Team._rank" of bean: "listeEquipe" org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:986) org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:225) org.apache.jsp.jsp.groupResult_jsp._jspx_meth_bean_write_0(org.apache.jsp.jsp.groupResult_jsp:389) org.apache.jsp.jsp.groupResult_jsp._jspService(org.apache.jsp.jsp.groupResult_jsp:148) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Partager