aspose file tools*
The moose likes Struts and the fly likes Problem in action mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem in action mapping" Watch "Problem in action mapping" New topic
Author

Problem in action mapping

kranthi chamarthi
Ranch Hand

Joined: May 08, 2007
Posts: 95
Hi,
I am new to struts 2. I am working on a simple example in which, upon clicking of a link in one page, the user should be taken to another page. But i am getting the following error.
There is no Action mapped for namespace / and action name HelloWorld.
Also i have searched the forum for the related questions and found one question.....which tells that i should have the struts.xml in classes base directory. So i kept the struts.xml in my WEB-INF/classes/tutorial/struts.xml.But still it didin't work.
Please advise me.
Thanks
kranthi
[ November 25, 2008: Message edited by: kranthi kumar.chamarthi ]
kranthi chamarthi
Ranch Hand

Joined: May 08, 2007
Posts: 95
Following are my struts.xml

welcome.html

I moved my struts.xml to applicationfolder/src/struts.xml
Please advise me
[ November 25, 2008: Message edited by: kranthi kumar.chamarthi ]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

First of all, while it may work, spell "false" right in the dynamic method invocation setting.

Is the HelloWorld class being deployed properly? What is the application context? You might be better off using the <s:url...> tag to create the link to make sure the link will be rendered properly for your context:

kranthi chamarthi
Ranch Hand

Joined: May 08, 2007
Posts: 95
Thanks for the reply David...But the problem is with the location of struts.xml....Initially i kept it in WEB-INF/classes/tutorial/struts.xml ...when i changed its location to WEB-INF/classes/struts.xml..It worked.
And what is dynamic method invocation???..I have seen about it in apache struts2 website but was not able to get a clear idea...Can you give me some information about it?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If a struts.xml file located in your source hierarchy isn't being deployed to /WEB-INF/classes then something's wrong with your IDE and/or deployment process.

Dynamic method invocation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in action mapping