• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with DispatchAction.

 
Ranch Hand
Posts: 32
MyEclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the request contain the "action" parameter?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 will open the floodgates of his own worst nightmare! All in a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic