Fala ae, moçada…
Não consigo entender qual é desse problema.
Através do Logger eu vejo que o fluxo entra e sai da minha action.
Action:
package br.com.ee.action;
import java.util.Locale;
import org.springframework.context.support.ResourceBundleMessageSource;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.logging.Logger;
public class TesteStrutsAction extends ActionSupport {
/**
*
*/
public String inicio(){
LOG.info(messageSource.getMessage("routine.start", new Object[]{"Entrei na Action"}, Locale.getDefault()));
try {
return SUCCESS;
} catch (Exception e) {
addActionError(e.getMessage());
LOG.error(e.getMessage(), e);
return ERROR;
} finally {
LOG.info(messageSource.getMessage("routine.finish", new Object[]{"Sai da Action"}, Locale.getDefault()));
}
}
}
struts.xml
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<constant name="struts.action.extension" value="action,," />
<!-- <constant name="struts.objectFactory" value="spring" /> -->
<package name="default" extends="struts-default">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/>
</result-types>
<global-results>
<result name="error" type="tiles">erro.page</result>
<result name="invalid.token" type="tiles">erro.page</result>
</global-results>
<global-exception-mappings>
<exception-mapping result="error" exception="java.lang.Throwable" />
</global-exception-mappings>
<action name="Inicio" class="br.com.ee.action.TesteStrutsAction" method="inicio" >
[b]<result name="success">/WebContent/jsp/index.jsp</result>[/b]
</action>
</package>
No meu index.jsp faço um sendRedirect(“Inicio.action”) no response.
O tomcat me informa o seguinte:
type Status report
message /javaEE/WebContent/jsp/index.jsp
description The requested resource (/javaEE/WebContent/jsp/index.jsp) is not available.
Mas existe sim um index.jsp!
Alguém pode me dar uma força?
Abraços!