Bonjour, la fonction rechercher du forum semble planter ou mouliner dans le vide chez moi aujourd'hui et je n'ai pas trouvé dans la FAQ.
J'imagine que vous allez sourire, mais je suis bloqué depuis ce matin sur ce message et comme je suis débutant en Struts je n'ai pas la moindre idée d'où chercher !
ci-joint :
mon fichier web.xml
et le struts-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
28
29
30
31
32
33
34
35
36
37
38
39
40
41 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app SYSTEM "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>Action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list> </web-app><?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app SYSTEM "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>Action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list> </web-app>
L'application est une application d'apprentissage en 3 écrans : 1) login (user/pass) 2) écran recherche (un champ "nom") et 3) un écran résultat
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 <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> <struts-config> <!-- ========== Form Bean Definitions ============ --> <form-beans> <form-bean name="loginForm" type="com.sylis.annuaire.web.form.LoginForm" /> <form-bean name="rechercheForm" type="com.sylis.annuaire.web.form.RechercheForm" /> <form-bean name="resultatForm" type="com.sylis.annuaire.web.form.ResultatForm" /> </form-beans> <!-- ========== Global Forward Definitions ========= --> <global-forwards> <forward name="recherche" path="/recherche.jsp" /> <forward name="resultat" path="/resultat.jsp" /> </global-forwards> <!-- ========== Action Mapping Definitions ======== --> <action-mappings> <action path="/loginAction" name="loginForm" type="org.springframework.web.struts.DelegatingActionProxy" scope="session" input="login.jsp" validate="no"> <set-property property = "cancellable" value="true" /> <exception key="error.loginIncorrect" path="/login.jsp" scope="request" type="com.sylis.annuaire.services.exceptions.LoginException"/> <exception key="error.passwordIncorrect" path="/login.jsp" scope="request" type="com.sylis.annuaire.services.exceptions.PasswordException"/> </action> <action path="/resultatAction" name="resultatForm" type="org.springframework.web.struts.DelegatingActionProxy" scope="request" input="resultat.jsp" validate="no"> <set-property property = "cancellable" value="true" /> </action> <action path="/rechercheAction" name="rechercheForm" type="org.springframework.web.struts.DelegatingActionProxy" scope="request" input="recherche.jsp" validate="no"> <exception key="error.nomObligatoire" path="/recherche.jsp" scope="request" type="com.sylis.annuaire.services.exceptions.NomObligatoireException"/> </action> </action-mappings> <message-resources parameter="langue" null="false" /> <!-- *********************************************** --> <!-- Plug-in SPRING --> <!-- ********************************************** --> <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="/WEB-INF/coucheWeb.xml /WEB-INF/coucheService.xml" /> </plug-in> </struts-config>
j'aimerais déjà faire fonctionner ça avec des valeurs en dur avant d'aller les chercher dans une base de donnée. Merci d'avance !
Partager