I have many input fields in a form to post data to server side.
And in controller, I want to get all attributes in ModelMap like this:
public String save(ModelMap model) {
....
}
I don’t want to use @RequestParam since there are so many fields to be sent. I think the data in a form will be posted and saved in ModelMap automatically, but its not working
Could anyone help me?
Thanks.
You should use a @ModelAttribute in the form handler
and this is how you will send the page to the form