bonjours,
je travvaille avec myeclipse 5.1,struts et hibernate.Dans l'application que je suis entrain de realiser,la personne s'authentifie et puis elle accede à une ppage jsp ou il y'a les informations qui la concerne.pour cela j'ai crée une form GetUserFicheForm associée à une action GetUserFicheAction
le code de la forme est:
public class GetUserFicheForm extends ActionForm {
/*
* Generated Methods
*/
private String nom;
private String prenom;
private String grade;
private String username;
private String password;
private String profil;
private long idutilisateur;
/**
* @return the idutilisateur
*/
public long getIdutilisateur() {
return idutilisateur;
}
/**
* @param idutilisateur the idutilisateur to set
*/
public void setIdutilisateur(long idutilisateur) {
this.idutilisateur = idutilisateur;
}
/**
* @return the password
*/
public String getPassword() {
return password;
}
/**
* @param password the password to set
*/
public void setPassword(String password) {
this.password = password;
}
/**
* @return the profil
*/
public String getProfil() {
return profil;
}
/**
* @param profil the profil to set
*/
public void setProfil(String profil) {
this.profil = profil;
}
/**
* @return the username
*/
public String getUsername() {
return username;
}
/**
* @param username the username to set
*/
public void setUsername(String username) {
this.username = username;
}
/**
* @return the grade
*/
public String getGrade() {
return grade;
}
/**
* @param grade the grade to set
*/
public void setGrade(String grade) {
this.grade = grade;
}
/**
* @return the nom
*/
public String getNom() {
return nom;
}
/**
* @param nom the nom to set
*/
public void setNom(String nom) {
this.nom = nom;
}
/**
* @return the prenom
*/
public String getPrenom() {
return prenom;
}
/**
* @param prenom the prenom to set
*/
public void setPrenom(String prenom) {
this.prenom = prenom;
}
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
return null;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
}
Mais le probleme c'est que j'obtiens une table vide,c'est comme il n'ya rien dans la bd,pourtant c'est pas le cas.
si quelqun peut m'aider svp,c'est vraiment urgent
Êtes vous sur de passer par votre Class ServiceUser ?
Avez vous créer un test pour garantir que votre méthode getUserList() vous retourne un ou plusieurs résultats ? (JUnit ? )
Quel version de Struts & Hibernate utilisez vous ?
__________________________
La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi. Ici, nous avons réuni théorie et pratique : rien ne fonctionne et personne ne sait pourquoi...