Skip to main content

Reading Model Data

Learn Reading Model Data (Model & View, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Reading model data happens in the view: a template uses the attribute name to show the value the controller added. In a controller you can read model data already added with model.getAttribute , containsAttribute or asMap() . Parameters : @ModelAttribute on a handler parameter reads an object that an earlier @ModelAttribute method or a redirect flash put in the model.

More lessons in Model & View