the controller class &
jsp are as follows :
@RequestMapping(value = "/loginForm",method=RequestMethod.GET)
public void loginForm(Model model)
{
System.out.println("in loginForm()##################");
model.addAttribute(new LoginForm());
}
@RequestMapping(value = "/login", method = RequestMethod.POST)
public void onSubmit(@ModelAttribute LoginForm loginFormObj,Model model)
{
System.out.println("userId in onsubmit$$$$$$$$$$$"+loginFormObj.getUserId());
}
login.jsp has the form tag as :
<form:form method="POST" modelAttribute="loginForm" >