From the course: Spring: Spring MVC
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
@ModelAttribute: Add Spring form tag library
From the course: Spring: Spring MVC
@ModelAttribute: Add Spring form tag library
- [Teacher] Now, the next step is to add the Spring form tag library to the project's GSPs. Now, Spring provides a comprehensive tag library for all the data binding of our tags that we need to embed as a part of HTML. So we can just go and Google that, "spring form taglib," and if you see on the official documentation, you should be able to get the taglibs in text in order to put it on GSP. There we go. So I'm just going to copy this. Come back to IDE. Let's go to the register page. And let's put it at the top there. So, we have the form tag library embedded on the GSP page, and now, we are basically going to derive all the tags for the form that we have on this register.GSP from this taglib. So let's go down there and start putting in all the attributes, and that, I believe, is the next step, so you have to convert all the HTML form elements to the Spring form tags. So let's do that. So the first is the prefix…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Basic annotations for controllers4m 20s
-
(Locked)
Create a controller with request mapping4m
-
(Locked)
@RequestParam in Controller5m 37s
-
(Locked)
Add database code3m 7s
-
(Locked)
Access data from Model8m 15s
-
(Locked)
@ModelAttribute: Add JSP pages4m 55s
-
(Locked)
@ModelAttribute: Access model attributes on JSP6m 7s
-
(Locked)
@ModelAttribute: Add Spring form tag library5m 15s
-
(Locked)
Test the application6m 37s
-
(Locked)
-
-
-
-
-
-
-