handelling two(or more) submit buttons on same JSP page
I just started to work with Spring framework and intend to use it with Hibernate. I am stuck at a point an need (a lot of :wink: ) help.
I have a JSP with following inputs:
user name and user id
I have two submit buttons on this page: one update, and second delete.
Both these buttons have their individual role to play, like one updates and secod deletes the record.
I dont have a clue how will I post the form to two different controllers and seek your help. I need your help in configuring this in my springapp-servlet.xml and my JSP page.
Like when I have only one submit button, things are simple. I have a form where I bind each of the flds, user name and user id, with respective properties of an object using <spring:bind>, then in my sprinapp-servlet.xml I declare a managed bean with the command class etc and in my controller I use the accessor methods.
But how will I decide, which controller should be invoked depending on which of the two buttons are clicked? :?:
I hope I was able to make my question simple and clear. I would greatly appreciate your inputs.