Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in action mapping

 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic