The tag <form> typically used with command-line objects with form support, and is not associated with controllers using individual @RequestParam arguments. That is why you will not see any examples of documentation using this combination.
For example, instead of @RequestParam("klasid") , you will have a command class with the klasid field, and Spring will bind the entire batch together:
@RequestMapping(value = "post") public String postIndex(@ModelAttribute MyCommandClass command) { /../ }
This makes sense when you consider that forms usually have several parameters, and it would be burdensome to declare them all with @RequestParam .
Having said that, you can still do it - any form controls will generate request parameters to which @RequestParam can bind, but if you decide to deviate from the Spring MVC form support command template, this is rather inconvenient.
source share