Salut,
je voudrais utiliser une bean dans ma jsp qui permet d'avoir des infos sur un utilisateur.
voici ma page de test, elle devrait utilser les méthodes de la classe suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
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
53
54
Par contre ca ne marche pas, je seche dessus depuis super longtemps, j'ai tout essayé et je ne sais pas ce qui marche pas.
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
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
45package divers; import java.sql.*; public class Client { public Client() { } private String login, mdp, nom, prenom, email, adresse, ville, cp, telephone, sexe, naissance, role, admin; private boolean virtuel; private Connection con; private Statement st; private ResultSet lers ; public void execRequete(String lelogin) throws Exception { Connection con = Connexion.getConnection(); Statement st=con.createStatement(); ResultSet rs = st.executeQuery("select * from clients where login='"+ lelogin +"';"); this.nom = rs.getString("nom"); this.prenom = rs.getString("prenom"); this.email = rs.getString("email"); this.adresse = rs.getString("adresse"); this.ville = rs.getString("ville"); this.cp = rs.getString("cp"); this.telephone = rs.getString("telephone"); this.sexe = rs.getString("sexe"); this.naissance = rs.getString("naissance"); this.role = rs.getString("role"); con.close() ; } public boolean estAdmin() { return (admin.equals("admin")); } public String getNom() { return nom; }
Quelqu'un pourrait m'aider?

 

 
		
		 
        

 
			
			

 
   


 [JSP]utilisation d'un Bean
 [JSP]utilisation d'un Bean
				 Répondre avec citation
  Répondre avec citation
Partager