Assumed I have two submit button in the jsp as follow:
And the controller looks as follow:Code:... <form:form action="test-detail.html" method="post"> ... <input name="button1" type="submit" value="Do Print"/> <input name="button2" type="submit" value="Do SendEmail"/> ...
How can I catch the different submit request in the controller?Code:... public class TestController extends MQController { ... @Override protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception { .... return new ModelAndView(getSuccessView(), model); } }


Reply With Quote