From the course: Spring: Spring MVC
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Test session flow and implement forwarding
From the course: Spring: Spring MVC
Test session flow and implement forwarding
- [Instructor] Now that we have set up both the controllers to log in and the user profile for the session attributes, let's grab the profile jsp. That's something that we have to add in our jsp folder. So I'm going to go back to your chapter seven resources, and that is already provided to you and that chapter folder. Let's copy that. And paste it on the jsp folder. Right, so we have the view ready with us. The profile controller is also ready with us. And the last step of this is to forward the control to UserProfileController from the LoginController. So the flow that we have is like this: the user will submit the login form, we will enter the LoginController. The LoginController is going to store the session attributes, and from here, we are going to move the control to the UserProfileController. Now that can be done with a concept of forwarding, which is basically borrowed from the servlets jsp api. If you…
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)
Introduction to interceptors3m 28s
-
(Locked)
Built-in and custom interceptors2m 45s
-
(Locked)
Add interceptor class5m 45s
-
(Locked)
Register interceptors3m 17s
-
(Locked)
Request and session attributes1m 57s
-
(Locked)
Save and get SessionAttributes demo6m 47s
-
(Locked)
Test session flow and implement forwarding7m 37s
-
(Locked)
End HttpSession8m 33s
-
(Locked)
Redirecting outside an application3m 40s
-
(Locked)
Introduction to themes1m 48s
-
(Locked)
Define themes and theme resolver4m 18s
-
(Locked)
Define ThemeChangeInterceptor6m 38s
-
(Locked)
Pick themes on JSPs2m 37s
-
(Locked)
Introduction to l10n and i18n3m
-
(Locked)
Automatic locale resolution demo9m 55s
-
(Locked)
CookieLocaleResolver and interceptor for l10n and i18n5m 37s
-
(Locked)
-
-