i have 2 buttons on a form, each button calls different servlets. how can i implement it such that when i press one button, first servlet is called and when press 2nd, 2nd servlet is called. thanks a lot
Several ways: 1. Actually have two forms, with different actions 2. instead of type=SUBMIT use type=BUTTON and attach a little JavaScript onclick handler to set the "action" property of the form and submit it. 3. send the form to a simple "dispatcher" servlet which decides which button was pressed and forwards to the appropriate destination I'm sure there are more, too.