From the course: Spring Web MVC 6

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Access model attributes on Thymeleaf UI

Access model attributes on Thymeleaf UI - Spring Tutorial

From the course: Spring Web MVC 6

Access model attributes on Thymeleaf UI

- [Instructor] Now that we have connected all the layers, the product controller, to the fragments and the product repository, the last bit that remains is getting the products on the search results page and displaying them. So let's go and open our search-results.html, this one. And this is in the pure HTML form. So first, we'll have to Bootstrap it with Thymeleaf namespace. So I'll go to fragments.html, copy this namespace on line number 2, and come to the search-results page and insert it. So now we are ready to start using Thymeleaf tags here. Next, we have the head section here, let that be as is. We have the header section under the body. That we will replace by the fragment again to make it consistent with all our other templates. So this is something that we know by now. So we are replacing this with the header fragment from the fragments.html. This is the main section which we'll look at in a minute. And…

Contents