Bom, primeiramente desculpe se postei no lugar errado, sou novo no forum!
Bom eu fiz o curso de formação java na caelum tem mais de 1 ano.
Sou programador a algum tempo, porem, não mecho com java desde a epoca que fiz o curso.
Estou tomando sufoco pra configurar struts2, acreditem se quiser =//
seguinte, aparece q seguinte msg:
http://localhost:8080/fj21-tarefas/olaMundoStruts
[b]HTTP Status 404 - There is no Action mapped for namespace / and action name olaMundoStruts.
type Status report
message There is no Action mapped for namespace / and action name olaMundoStruts.
description The requested resource (There is no Action mapped for namespace / and action name olaMundoStruts.) is not available.[/b]
olaMundoAction.java
package br.com.caelum.tarefas.action;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
public class OlaMundoAction {
@Action(value = "olaMundoStruts", results = {
@Result(location = "olaMundoStruts.jsp", name = "ok")}
)
public String execute(){
System.out.println("Executando a lógica com Struts 2");
return "ok";
}
}
olaMundoStruts.jsp
Hello World whit Struts
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>franktoys</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
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
</struts>
Bom esses sao os arquivos do curso, nao sei oque pode ta errado, o TOMCAT roda le o .jsp mas nao le a action que chama o jsp!
Fico no aguardo!
vlwww