Hi,
I am also facing the same problem. I have tried different alternatives but failed to resolve
I am getting the welcome page and initPersonAction is working properly... but, when I try to invoke other actions it is giving me the problem:
2010-10-25 18:17:09,814 ERROR [org.apache.struts2.dispatcher.Dispatcher] - <Could not find action or result>
There is no Action mapped for namespace / and action name addPersonAction!add. - [unknown location]
I am trying to access one Action class with different action names and method names.
Please suggest me
my struts.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE
struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.devMode" value="false" />
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<package name="default" extends="struts-default">
<!-- Login Action -->
<action name="login" class="com.atos.referentiel.action.LoginAction">
<result name="SUCCESS">/WEB-INF/jsp/referentiel_home.jsp</result>
<result name="FAILURE">/WEB-INF/jsp/login_error.jsp</result>
</action>
<!-- Person Action -->
<action name="addPersonAction1" method="addPerson" class="com.atos.referentiel.action.PersonAction">
<result name="success">/WEB-INF/jsp/person/personMaster.jsp</result>
</action>
<action name="searchPersonAction" method="search" class="com.atos.referentiel.action.PersonAction">
<result name="success">/WEB-INF/jsp/person/personMaster.jsp</result>
</action>
<action name="initPersonAction" method="init" class="com.atos.referentiel.action.PersonAction">
<result name="success">/WEB-INF/jsp/person/personMaster.jsp</result>
</action>
<action name="addPersonAction" method="add" class="com.atos.referentiel.action.PersonAction">
<result name="input">/WEB-INF/jsp/person/addPerson.jsp</result>
</action>
<action name="loginError">
<result>login.jsp</result>
</action>
</package>
</struts>