From the course: Spring: Spring MVC

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

@ModelAttribute: Add JSP pages

@ModelAttribute: Add JSP pages

From the course: Spring: Spring MVC

Start my 1-month free trial

@ModelAttribute: Add JSP pages

- [Instructor] Now let's implement a use case using the @ModelAttribute annotation. And what is the use case that we're going to implement, let's look at that. So let's say you are on the home page you're going to click on the login link, that log in link should take the user to the login page. And that login page will have a register user link. When we click on that then we will display the registration page for the user and then we can do the rest of the flow from the registration page. So for that the steps begin with adding login.jsp and register.jsp to the project. So in your resources folder, you already have those available with you. So let's go to the resources folder. So register.jsp and login.jsp, both of them let's copy and come back to IDE and paste them under the jsp folder. So we have the login and the register.jsp both available now as a part of the project. Next is you have to add a route in HomeController…

Contents