Bonjour, je vous présente mon fichier de configuration :

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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://struts.apache.org/dtds/struts-config_1_2.dtd">
 
 
<struts-config>
 <form-beans>
	<form-bean name="cfp" type="presentation.str.AjoutClientForm"/>
	<form-bean name="cfps" type="presentation.str.ClientsForm"/>
 </form-beans>
 <global-forwards>
  <forward name="VueAjoutClient" path="/vues/AjouterClient.jsp"/>
  <forward name="VueClients" path="/vues/Clients.jsp"/>  
 </global-forwards>
 <action-mappings>
	<action 
	 path="/cli"
	 input="/vues/AjouterClient.jsp" 
	 name="cfp"
	 type="presentation.str.AjoutClientAction" 
	 scope="request" 
	 validate="true">
	 <forward name="success" path="/vues/Clients.jsp" redirect="false"/>
     <forward name="failure" path="/vues/AjouterClient.jsp"/>
     </action>
 
     <action 
	 path="/cli2"
	 input="/vues/Clients.jsp" 
	 name="cfps"
	 type="presentation.str.ClientsAction" 
	 scope="request" 
     />
     </action-mappings>
 <message-resources parameter="ApplicationResources"/> 
</struts-config>
j'ai une question a vous poser : est ce que pour cahque page je vais définir une action cad /cli1, /cli2 ..., mais normalement je dois avoir un seul controleur !!!?