File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes There is no Action mapped for namespace ... and action name ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "There is no Action mapped for namespace ... and action name ..." Watch "There is no Action mapped for namespace ... and action name ..." New topic
Author

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

Yash Dutt
Greenhorn

Joined: Apr 01, 2009
Posts: 5
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

Joined: Aug 03, 2008
Posts: 9313
    
  17

Yash can you post the code please so that it would be easier to track the cause of the problem...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Yash Dutt
Greenhorn

Joined: Apr 01, 2009
Posts: 5
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

Joined: Sep 29, 2008
Posts: 12617

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: There is no Action mapped for namespace ... and action name ...