• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use html:submit with DispatchAction?  RSS feed

John Zwick
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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:

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!