Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to use html:submit with DispatchAction?

Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a 2 submit buttons on a form that calls a DispatchAction class as below. However when that button is clicked, it tries to call the method in my dispatchaction class that is equivalent to what the button text is. (i.e. if the button text is "Submit Selected" it tries to call the "Submit Selected" method in my action class and fails: "500 Action[/manageJob] does not contain method named Submit Selected ")

I can only get it to work if I rename the button text to the exact name of my action method (i.e."submitSelected" instead of "Submit Selected"). But this is not what I want the button to look like.

How can I get it to call the appropriate method without changing the button's text?

DispatchAction class:

the jsp:

my struts-xml:

    Bookmark Topic Watch Topic
  • New Topic