Bonjour à tous,
J'ai fait une page jsf toute simple,ca fonctionne.Ensuite,j'ai essayé de l'améliorer et la depuis j'arrive sur impossible d'afficher cette page
Voici le web.xml
Le faces-config.xml
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 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <!-- Configuration de JSF --> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <servlet> <servlet-name>FacesServlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>FacesServlet</servlet-name> <url-pattern>>/faces/*</url-pattern> </servlet-mapping> <!-- Fin de la configuration de JSF --> </web-app>
Le fichier index.jsp renvoie juste vers acceuil.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
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<?xml version='1.0'?> <faces-config> <application> <locale-config> <default-locale>fr</default-locale> </locale-config> </application> <managed-bean> <managed-bean-name>Prospectkabo</managed-bean-name> <managed-bean-class>Prospects_kabo</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>ProspectKaboDao</managed-bean-name> <managed-bean-class>ProspectsKaboDao</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>QualifKabo</managed-bean-name> <managed-bean-class>Qualif_kabo </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <navigation-rule> <from-view-id>../script_kabo/index.jsp</from-view-id> <navigation-case> <from-outcome>ValiderIndex</from-outcome> <to-view-id>../script_kabo/script/frame.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>../script_kabo/index.jsp</from-view-id> <navigation-case> <from-outcome>ReturnValiderIndex</from-outcome> <to-view-id>../script_kabo/ReturnValiderIndex.jsp</to-view-id> </navigation-case> </navigation-rule> </faces-config>
ProspectKabo.java
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 <%@page contentType="text/html"%> <%@taglib uri="http://java.sun.com/jsf/html" prefix="html"%> <%@taglib uri="http://java.sun.com/jsf/core" prefix="core"%> <html> <head> <title>Air France</title> <body> <center><core:view> <html:form> <html:graphicImage value="../images/logo.jpg"/> <br> <html:outputText value="Air France KABO 2007" style="color:red"/> <br> <br> <html:outputText value="Sysid :" /> <br> <html:inputText id="sysid" value="#{ProspectKabo.Sysid}" required="true"> <core:validateLength minimum="1" maximum="10"/> </html:inputText> <html:message for="sysid" style="color:red" /> <br><br> <html:outputText value="Enqueteur :" /> <br> <html:selectOneMenu id="enqueteur" value="#{Prospectkabo.ta}" required="true" > <core:validateLength minimum="1"/> <core:selectItems value="#{ProspectKaboDao.ListTa}" /> </html:selectOneMenu> <html:message for="enqueteur" style="color:red" /> <html:commandLink value="Submit" action="#{Prospectkabo.PKB.valider}"/> </html:form> </core:view></center> </body> </html>
et enfin ProspectKaboDao
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193 public class Prospects_kabo extends Prospects { private Prospects_Kabo_Binding PKB; private Prospects_kabo PK; private Qualif_kabo QK; public Prospects_kabo() { super(); PK = new Prospects_kabo(); CreationObjet(); } public void CreationObjet(){ QK=new Qualif_kabo(); PKB=new Prospects_Kabo_Binding(PK,QK); } private String Sysid; private String Gin; private String Carte; private String Prenom; private String Nom; private String RaisonSociale; private String TypeAdresse; private String Adresse1; private String Adresse2; private String CP; private String Ville; private String FixePro; private String MobPro; private String FixePerso; private String MobPerso; public String getAdresse1() { return Adresse1; } public void setAdresse1(String adresse1) { Adresse1 = adresse1; } public String getAdresse2() { return Adresse2; } public void setAdresse2(String adresse2) { Adresse2 = adresse2; } public String getCarte() { return Carte; } public void setCarte(String carte) { Carte = carte; } public String getCP() { return CP; } public void setCP(String cp) { CP = cp; } public String getFixePerso() { return FixePerso; } public void setFixePerso(String fixePerso) { FixePerso = fixePerso; } public String getFixePro() { return FixePro; } public void setFixePro(String fixePro) { FixePro = fixePro; } public String getGin() { return Gin; } public void setGin(String gin) { Gin = gin; } public String getMobPerso() { return MobPerso; } public void setMobPerso(String mobPerso) { MobPerso = mobPerso; } public String getMobPro() { return MobPro; } public void setMobPro(String mobPro) { MobPro = mobPro; } public String getNom() { return Nom; } public void setNom(String nom) { Nom = nom; } public String getPrenom() { return Prenom; } public void setPrenom(String prenom) { Prenom = prenom; } public String getRaisonSociale() { return RaisonSociale; } public void setRaisonSociale(String raisonSociale) { RaisonSociale = raisonSociale; } public String getTypeAdresse() { return TypeAdresse; } public void setTypeAdresse(String typeAdresse) { TypeAdresse = typeAdresse; } public String getVille() { return Ville; } public void setVille(String ville) { Ville = ville; } public String getSyid() { return Sysid; } public void setSyid(String syid) { Sysid = syid; } public Prospects_Kabo_Binding getPKB() { return PKB; } public void setPKB(Prospects_Kabo_Binding pkb) { PKB = pkb; } public Prospects_kabo getPK() { return PK; } public void setPK(Prospects_kabo pk) { PK = pk; } public Qualif_kabo getQK() { return QK; } public void setQK(Qualif_kabo qk) { QK = qk; } }
Il n'arrive pas à trouve getListTa
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 import java.sql.CallableStatement; import java.sql.Connection; import java.sql.Types; import java.util.ArrayList; import java.util.List; import javax.faces.model.SelectItem; public class ProspectsKaboDao { private static ProspectsKaboDao instance = new ProspectsKaboDao(); public static ProspectsKaboDao getInstance() { return instance; } public List ListTa() { List ta = new ArrayList(); ta.add(new SelectItem("M.FLEURY")); ta.add(new SelectItem("O.BOROTRA")); ta.add(new SelectItem("S.BENTOUATI")); ta.add(new SelectItem("E.DELECROIX")); ta.add(new SelectItem("C.LEBAUPIN")); ta.add(new SelectItem("TA1")); ta.add(new SelectItem("TA2")); ta.add(new SelectItem("TA3")); ta.add(new SelectItem("TA4")); return ta; } }
Partager