This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

There is no Action mapped for namespace ... and action name ...

 
Yash Dutt
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]"
 
Ankit Garg
Sheriff
Posts: 9510
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yash can you post the code please so that it would be easier to track the cause of the problem...
 
Yash Dutt
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read UseCodeTags.

Please show the *complete* configuration for the actions, including the package, with its namespace attribute.

I'm not sure what you mean by That won't "retrieve" anything, that will generate a URL. Not a link, just a URL. In what context are you using it?

Showing us the submit button code without the form definition it's submitting to is similarly unhelpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic