Bonjour,
Lorsque je clique sur un lien dans une jsp j'obtient l'erreur suivante:
Request[/gestionConseiller] does not contain handler parameter name 'hidden'. This may be caused by whitespace in the label text.
Voici ma 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
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 <%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld"%> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html"%> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> <html:html xhtml="true" locale="true"> <head> </head> <script type='text/javascript'> function verification() { var pattern = new RegExp("^[0-9]{4}$"); if ((document.getElementById('codPersonnel').value == "") || (document.getElementById('nom').value == "") || (document.getElementById('prenom').value == "")|| (document.getElementById('datCrea').value == "") || (document.getElementById('bloque').value == "")|| (document.getElementById('passwd').value == "") || (document.getElementById('actif').value == "")|| (document.getElementById('datMaj').value == "") || (document.getElementById('codUser').value == "")|| (document.getElementById('codRole').value == "") ) { alert("Il faut remplir tout les champs !"); return false; } if (document.getElementById('codPersonnel').value !=''){ if (!pattern.test(document.getElementById('codPersonnel').value)) { alert('Vérifier le code personnel du conseiller '); return false; } if (document.getElementById('codPersonnel').length !=4)) { alert("Ce champ doit contenir 4 caractères !"); return false; } } if (document.getElementById('codUser').value !=''){ if (!pattern.test(document.getElementById('codUser').value)) { alert(" Vérifier le code personnel du conseiller ! "); return false; } if (document.getElementById('codUser').length !=4)) { alert("Ce champ doit contenir 4 caractères !"); return false; } } return true; } function setHidden(value){document.formulaire.hidden.value=value;} function submitModify(){ var conf = confirm("Etes-vous sûr de vouloir modifier cet élément ? "); if (conf){setHidden('maj');} else { setHidden('cancel'); } } function submitDelete(){ var conf = confirm("Etes-vous sûr de vouloir Supprimer cet élément ? "); if (conf){setHidden('supprimer');} else { setHidden('cancel'); } } </script> <body> <html:errors /> <html:form action="/gestionConseiller" method="get"> <html:hidden property="hidden" value="default"/> <table border="0" align="center"> <tr colspan="2" aligne="center"> <td><fmt:message key="conseiller.codepersonnel" /></td> <td><html:text property="codPersonnel" styleId="codPersonnel" size="20" /></td> </tr> <tr colspan="2" aligne="center"> <td><fmt:message key="conseiller.nom" /></td> <td><html:text property="nom" styleId="nom" size="20" /></td> </tr> <tr colspan="2" aligne="center"> <td><fmt:message key="conseiller.prenom" /></td> <td><html:text property="prenom" styleId="prenom" size="20" /></td> </tr> <tr colspan="2" aligne="center"> <td><fmt:message key="conseiler.passwd" /></td> <td><html:text property="passwd" styleId="passwd" size="20" /></td> </tr> <tr colspan="2" aligne="center"> <td><fmt:message key="conseiller.bloque" /></td> <td><html:text property="bloque" styleId="bloque" size="20" /></td> </tr> <tr colspan="2" aligne="center"> <td><fmt:message key="conseiller.actif" /></td> <td><html:text property="actif" StyleId="actif" size="20" /></td> </tr> <tr colspan="2" aligne="center"> <td><fmt:message key="conseiller.coderole" /></td> <td><html:text property="codeRole" styleId="codeRole" size="20" /></td> </tr> <center> <table> <tr> <td> <html:submit property="submit" value="Ajouter " onclick="verification(); setHidden('ajouter');"/> </td> <td> <html:submit property="submit" value="Supprimer" onclick="verification(); submitDelete();"/> </td> <td> <html:submit property="submit" value="Mise à jour" onclick="verification(); submitModify();"/> </td> <td> <html:reset property="reset" value="Annuler" /> </tr> </table> </center> </table> </html:form><br> </body> </html:html>
la déclaration de l'action dans struts-config.xml:
Je comprend pas d'où vient le problème, s'il vous plait aidez moi.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 <action path="/gestionConseiller" type="org.springframework.web.struts.DelegatingActionProxy" name="gestionConseillerForm" parameter="hidden" scope="request" validate="false"> <forward name="success" path="/gestionConseiller.jsp" />
Partager