Skip to main content

Form Binding

Learn Form Binding (View Technologies, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Form binding copies the submitted form fields into the properties of a Java object, so you work with an object instead of many strings. How : the field name must match the property name; a field email is set through setEmail on the @ModelAttribute object. Both ways : on GET the object is put in the model to fill the form; on POST Spring creates it from the request and passes it to the handler.

More lessons in View Technologies