File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with DispatchAction.

 
peter aerts
Ranch Hand
Posts: 32
MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
I am getting this error when I am trying to call a Action which has extended a DispatchAction.
Request[/admin] does not contain handler parameter named action.




The Class AdminAction is as follows:



The struts-config is as follows:


Please Help me.
thank you.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Request[/admin] does not contain handler parameter named action


Is this your comlete Actionclass AdminAction ? I think you missed the declare and implement the method called "action" as specified in "parameter" attribute in action tag.


parameter="action"

Check out this
DispatchAction for more information.
 
peter aerts
Ranch Hand
Posts: 32
MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Balu Sadhasivam for your responce.
yes this is my complete AdminAction.
as you can see in action tag,i have parameter="action".
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the request contain the "action" parameter?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if this is causing the problem you're currently experiencing or not, but one should never use the name action for the parameter used in DispatchAction. The reason for this is that in HTML, a FORM has an action parameter, which is the URL to be executed when the form is submitted. Therefore, having an input element named "action" can confuse things and cause strange errors. Use some other name such as "actionMethod".
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can a parameter named "action" can interfere with a form tag's "action" attribute?
 
peter aerts
Ranch Hand
Posts: 32
MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you everybody for your ideaes.
I found the problem.
I use the dispatchMethod to dispatch to the specified method(menuList method of AdminAction class)at this program and everythings is ok now.



dispatchMethod is in the AdminAction class too.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic