Salut, mon pb est ke j'écris un file pays.jsp dans lequel je veux afficher les coordonées d'un pays dans une page. mais je le fais pour l'ID et le nom , mais pour la superficie ça ne marche pas. Code d'affichage de l'ID: <input name="ID_POINT" value="<jsp:getProperty name="pays" property="ID_POINT"/>" type="text" id="ID_POINT" /> Code d'affichage de la superficie: <input name="SUPERFICIE" value="<jsp:getProperty name="pays" property="SUPERFICIE" />" type="text" id="SUPERFICIE" />
Voici le code de mon bean pays:
public class pays extends point implements table {
public int SUPER;
private int NBREHABITANT;
private String ID_UNIT;
public static String table="pays";
public pays()
{
super();
this.setSUPERFICIE(0);
this.setNBREHABITANT(0);
this.setID_UNIT("");
}
public pays(String id,String nom,int sup, int nbrehbt,String str) {
super(id,nom,null);
this.setSUPERFICIE(sup);
this.setNBREHABITANT(nbrehbt);
this.setID_UNIT(str);
// TODO Auto-generated constructor stub
}
public String getID_UNIT() {
return ID_UNIT;
}
public void setID_UNIT(String ID_UNIT) {
this.ID_UNIT = ID_UNIT;
}
public int getSUPERFICIE() {
return SUPER;
}
public void setSUPERFICIE(int SUPER) {
SUPER = SUPER;
}
public int getNBREHABITANT() {
return NBREHABITANT;
}
public void setNBREHABITANT(int nbrehabitant) {
NBREHABITANT = nbrehabitant;
}
Code du bean point:
public class point extends connexion implements table{
private String ID_POINT;
private String NOM;
private String ID_QUARTIER;
private static String table="point";
public point()
{
this.setID_POINT("");
this.setNOM("");
this.setID_QUARTIER("");
}
public point(String id)
{
this.ID_POINT=id;
}
public point(String id,String sup, String quar)
{
this.setID_POINT(id);
this.setNOM(sup);
this.setID_QUARTIER(quar);
}
public void setID_QUARTIER(String ID_QUARTIER) {
this.ID_QUARTIER = ID_QUARTIER;
}
public String getID_QUARTIER() {
return ID_QUARTIER;
}
public String getID_POINT() {
return ID_POINT;
}
public void setID_POINT(String id_point) {
ID_POINT = id_point;
}
public String getNOM() {
return NOM;
}
public void setNOM(String NOM) {
this.NOM = NOM;
}
public boolean equals(Object o)
{
if(o instanceof point) {return this.getID_POINT()==((point) o).getID_POINT();}
return false;
}
@Override
public String toString() {
// TODO Auto-generated method stub
return this.getID_POINT()+": "+this.getNOM();
}
}
Merci a tous les zero qui veulent bien y repondre.
Oui, donc tu peux marquer ton topic comme "résolu" avec le petit bouton en bas...
probleme <jsp:getProperty>
× Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
× Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.