GeeCON Prague 2014*
The moose likes Struts and the fly likes How to use html:submit with DispatchAction? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to use html:submit with DispatchAction?" Watch "How to use html:submit with DispatchAction?" New topic
Author

How to use html:submit with DispatchAction?

John Zwick
Ranch Hand

Joined: Mar 02, 2009
Posts: 34
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:

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to use html:submit with DispatchAction?