Request parameter is null calling methods on MultiActionController
In Spring 3.0
if i have a jsp page with two different links each calling different method on MultiActionController
<form:form method="POST">
<a href="user.htm?action=add" style="color: blue;">Add</a>
<a href="user.htm?action=delete" style="color: blue;">Delete</a>
</form:form>
on the MultiActionController i get request parameter as null so cannot validate the values
String username=request.getParameter("username");
String password=request.getParameter("password");
i also tried uing a button and changed it to look like a link but in case of button click add method is called twice once with requestparameter as null and second time with correct values, but this twice entry is creating a mess in the code also to make this work i am using form action which will not work in case of two different method calls
<form:form action="user.htm?action=add method="POST">
<input type="submit" value="I have info"/>"> ---> should call delete method
<input type="submit" value="Click to send info"/> ---> should call add method
</form:form>
want to achieve this without javascript
I have also set param reslover in xml file with default method to call