Problème struts2 sous eclipse

RandaH Messages postés 32 Date d'inscription   Statut Membre Dernière intervention   -  
KX Messages postés 16761 Date d'inscription   Statut Modérateur Dernière intervention   -
Bonjour ,
Je suis débutante en struts2, je viens de faire mon premier projet sous eclipse pour tester le struts2 mais lorsque je lance run avec tomcat une erreur s'affiche:

Etat HTTP 404 - /Struts2FirstApp/success.jsp

--------------------------------------------------------------------------------

type Rapport d''état

message /Struts2FirstApp/success.jsp

description La ressource demandée n''est pas disponible.


--------------------------------------------------------------------------------

Apache Tomcat/7.0.64


Voici web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html" xsi:schemaLocation="http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Struts2FirstApp</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

struts.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>
<constant name="struts.devMode" value="true"/>
<package name="default" extends="structs-default">
<action name="getHello" class="org.helloworld.java.action.HelloWorld">
<result name="success">/WEB-INF/success.jsp</result>
<result name="failure">/WEB-INF/error.jsp</result>
</action>
</package>
</struts>

Est-ce que vous avez une solution ? S'il vous plait c'est urgent
Merci d'avance

1 réponse

KX Messages postés 16761 Date d'inscription   Statut Modérateur Dernière intervention   3 020
 
Bonjour,

Je ne sais pas comment tu as fait ton projet ou la configuration de ton serveur, mais je te conseilles d'investir 1h pour prendre en main Maven, ça devrait te faire gagner pas mal de temps ensuite.

Débuter avec Maven :
https://forums.commentcamarche.net/forum/affich-37593827-debuter-avec-maven

Archetype Struts 2 (officiels) :
https://struts.apache.org/docs/struts-2-maven-archetypes.html
0