Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/03/2017, 07:18
sapales
 
Fecha de Ingreso: abril-2009
Mensajes: 121
Antigüedad: 15 años
Puntos: 4
Struts 2 - inicio

Hola:

Quiero aprender Struts 2. He creado en eclipse una aplicacion web con Maven y Tomcat 8. He metido en Maven las dependecnias de Struts 2.3.24 y arranca perfectamente. El problema es que al intentar usar Struts en sí:

http://localhost:8080/struts2/index.action

da un error:

Could not find action or result: /struts2/index

En el web.xml tengo:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.Stru tsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>

Y en el struts.xml:

<struts>
<constant name="struts.devMode" value="true" />
<constant name="struts.configuration.xml.reload" value="true" />
<package name="demo-struts" extends="struts-default">
<action name="index">
<result>/index.jsp</result>
</action>
</package>
</struts>

Es algo de configuración pero no lo consigo.

Gracias.