• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem with DispatchAction.

 
Ranch Hand
Posts: 32
MyEclipse IDE
  • 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.
 
Ranch Hand
Posts: 874
Android VI Editor Java
  • 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
  • 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".
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the request contain the "action" parameter?
 
Ranch Hand
Posts: 4864
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • 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
  • 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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic