Bonsoir,

Lorsque je configure struts tout fonctionne mais je couple avec spring en rajoutant
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
<listener>
<listener-class> org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
dans web.xml

Code : Sélectionner tout - Visualiser dans une fenêtre à part
<constant name ="struts.objectFactory" value="spring" />
dans struts.xml

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="UTF-8"?>
 
 
<beans default-autowire="autodetect" xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<bean id="clientDvo" class="Client"/>
</beans>
dans applicationContext.xml



et enfin (puisque je fais un formulaire):

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
 
import com.opensymphony.xwork2.ActionSupport;
 
public class Accueil extends ActionSupport {
private static final long serialVersionUID = -246501891704292910L;
 
 
private Client client;
 
 
 
 
public final String execute() {
System.out.println("Action exécutée: " + this.getClass().getName());
System.out.println("Données saisies: "
+ "\n Nom: " + this.client.getNom()
+ "\n Prénom: " + this.clien.getPrenom()
+ "\n Adresse: " + this.client.getAdresse()
+ "\n Age: " + this.client.getAge());
return SUCCESS;
}
public Client getClient() {
return client;
}
public void setClient(ClientF client) {
this.client= client;
}}
la classe gérant mon action de accueil.jsp

Voyez vous pourquoi mon serveur ne trouve pas ma page .jsp?sachant que tout fonctionne à merveille avant que je n'ajoute ceci pour coupler spring avec struts.Lorsque je fais http://localhost:8080/ProjetTest/pages/accueil.jsp cela fonctionne mais pas quand je vais sur http://localhost:8080/ProjetTest

Merci d'avance