javax.servlet.jsp.JspException: No getter method available for property for bean under name org.apache.struts.
Bonjour tout le monde
J'ai un problème depuis 3 jours! J'ai fais presque toutes les solutions proposées dans les Forums mais toujours ça persiste. Je travaille sur une application Web J2EE, Struts et HIbernate
Lorsque je veux remplir une liste par des données de la base de données, je tombe sur l'erreur suivante:
Code:
javax.servlet.jsp.JspException: No getter method available for property codeGr for bean under name org.apache.struts.taglib.html.BEAN
Voici le code dans ma page JSP:
Code:
1 2 3 4 5 6 7 8
| <td>
<html:select property="codeGr" styleId="codeGr"
styleClass="select0" errorStyleClass="erreur2">
<html:option value="0-0">- - - Tous les groupes - - -</html:option>
<html:optionsCollection property="groupes" label="libellegr"
value="codeGr" />
</html:select>
</td> |
Et dans ma FormBean:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| public String getCodeGr() {
return this.codeGr;
}
public void setCodeGr(String codeGr) {
this.codeGr = codeGr;
}
public String getLibellegr() {
return libellegr;
}
public void setLibellegr(String libellegr) {
this.libellegr = libellegr; |
La propriété est déclarée dans le fichier de mapping comme ça:
Code:
1 2 3 4 5 6
| <hibernate-mapping>
<class name="com.atis.modele.data.Groupe" table="Groupe" schema="dbo" catalog="eval">
<id name="codeGr" type="java.lang.String">
<column name="code_gr" length="50" />
<generator class="assigned" />
</id> |
Merci d'avoir m'aider à résoudre ce problème.
Merci infiniment, j'en ai vraiment besoin de votre aide.