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.
Add exception handler in Controller
- [Instructor] The next step is to add the spring form tags for the login page. Let's go back to the IDE. You already have the form tag library declaration done before on the register page. So we're going to pick it up from there. Let's go to register.jsp. If you go right at the top on line number two, just going to take that line, copy, go to login JSP, right at the top again, and paste that. So we have the form tag library of spring I will label now, and we can convert our login form for using the spring's form tag library tags. So let's do that transformation quickly. This will be form:form. Those two attributes can be the same. This will change to form input, and instead of name we should be attaching the path attribute. Similarly, this one for the password will change the same way and this will become path. At the end, let's close the form tag properly. So there we go. We've transformed the basic input…
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)
DispatcherServlet and special bean types3m 12s
-
(Locked)
Exception flow handler implementations4m 33s
-
(Locked)
Custom error page and Login controller4m 1s
-
(Locked)
Add method for selecting a user5m 51s
-
(Locked)
Add exception handler in Controller6m 28s
-
(Locked)
Global exception handler for application4m 52s
-
(Locked)
Default model attributes using @ControllerAdvice4m 27s
-
(Locked)
-
-
-
-
-