A la compilation :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
SEVERE: Exception starting filter struts2
Caught exception while loading file struts-default.xml - [unknown location]

Si je comprends bien il y aurai un probleme lors de la generation de mon fichier struts.xml.

voici son contenu :

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
 
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
 
<struts>
    <package name="tutorial" extends="struts-default">
        <action name="HelloWorld" class="jim.test.HelloWorld">
            <result>/HelloWorld.jsp</result>
        </action>
        <action name="ListStudents" >
            <result>/listStudents.jsp</result>
        </action>
        <action name="Calculer" class="tz.test.Addition">
            <result>/resultatAddition.jsp</result>
        </action>
        <action name="addStudent" class="hibernate.test.AddStudent">
            <result>/result.jsp</result>
        </action>
    </package>
</struts>
et voici le contenu du fichier web.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
 
 
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <display-name>My Application</display-name>
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
 
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>
Trouvez l'erreur !

merci