There is no Action mapped for namespace ... and action name ...
Yash Dutt
Greenhorn
Joined: Apr 01, 2009
Posts: 5
posted
0
Hi.....
i have configured a action mapping against two different action call resulting same JSP page where the action class having two different methods(save,display) to handle these call, one is for form submitting another is for form populating with values.and for the second call i have used <s:url> along with these (action,namespace,method) parameters.
But the resulting screen produce unhandled Exception: [b]"There is no Action mapped for namespace {my_namespace_name} and action name {my_action_name}. [unknownlocation]"
using <S:URL> to retrieve <s:url action="myAction" namespace="/myhome" method="display"/>
***************************************************************
using <S:SUBMIT> to save <s:submit value="Save" method="save"/>
################################################################
public class MyAction extends ActionSupport {
private Employee emp;
public String execute() throws Exception{
return SUCCESS;
}
public String save() throws Exception{
//code to save data
return SUCCESS;
}
public String display() throws Exception{
//code to retrieve data
return SUCCESS;
}
public void setEmp(Employee emp) {
this.emp=emp;
}
public Employee getEmp() {
return this.emp;
}
}
#################################################################
<action name="myAction" class="com.myhome.action.MyAction">
<result name="input">/myhome/employeeDtl.jsp</result>
<result >/myhome/employeeDtl.jsp</result>
</action>
#################################################################
what I want?? when I will call employeeDtl.jsp for first time it will retrieve data and populate the form
with all values.I may change the values corresponding to the Employee object and then submit
to save updated values.