Request Mapping for 2 forms within the same JSP page

I have 2 forms within the same jsp page, I want to link one form to a method in the controller while the other form to another method in the controller. Would like to know how do I write the RequestMapping since both the form’s method is POST and invoke the same from the jsp file.

Change the form action to different or expected urls

<form action="url1" method="post">
<form action="url2" method="post">


public method1(){

public method2(){

Did you try something like this!

yes I tried it but it isnt working

@sharonvarghese Why not take a look at this link:

1 Like

@osagie_ehigiato Thanks for the links :smile: