diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/MvcConfig.java b/spring-security-login-and-registration/src/main/java/org/baeldung/spring/MvcConfig.java index 5229893298..30a7b31202 100644 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/spring/MvcConfig.java +++ b/spring-security-login-and-registration/src/main/java/org/baeldung/spring/MvcConfig.java @@ -36,6 +36,7 @@ public class MvcConfig extends WebMvcConfigurerAdapter { public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login.html"); + registry.addViewController("/registration.html"); registry.addViewController("/logout.html"); registry.addViewController("/homepage.html"); registry.addViewController("/expiredAccount.html"); diff --git a/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/RegistrationController.java b/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/RegistrationController.java index 3d5e42ab2c..c0c3f7c02f 100644 --- a/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/RegistrationController.java +++ b/spring-security-login-and-registration/src/main/java/org/baeldung/web/controller/RegistrationController.java @@ -68,9 +68,7 @@ public class RegistrationController { @ResponseBody public GenericResponse registerUserAccount(@Valid final UserDto accountDto, final HttpServletRequest request) { LOGGER.debug("Registering user account with information: {}", accountDto); - // if (result.hasErrors()) { - // return new GenericResponse(result.getFieldErrors(), result.getGlobalErrors()); - // } + final User registered = createUserAccount(accountDto); if (registered == null) { return new GenericResponse("email", messages.getMessage("message.regError", null, request.getLocale())); diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/badUser.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/badUser.jsp index 38c8a8e3a0..e090c55e29 100644 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/badUser.jsp +++ b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/badUser.jsp @@ -17,7 +17,7 @@ code="label.badUser.title"> ${param.message}
-">"> diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/expiredAccount.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/expiredAccount.jsp index fa6796c6a8..6d45aa3da4 100644 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/expiredAccount.jsp +++ b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/expiredAccount.jsp @@ -16,7 +16,7 @@
-">"> diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/forgetPassword.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/forgetPassword.jsp index 9a25ea9b2b..7e7ee0c01f 100644 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/forgetPassword.jsp +++ b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/forgetPassword.jsp @@ -32,7 +32,7 @@
-"> +">
"> diff --git a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/login.jsp b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/login.jsp index c8d8acc07b..a0611aed8b 100644 --- a/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/login.jsp +++ b/spring-security-login-and-registration/src/main/webapp/WEB-INF/view/login.jsp @@ -97,7 +97,7 @@ ${param.message}
Current Locale : ${pageContext.response.locale}
">">


"> <%@ page contentType="text/html;charset=UTF-8" language="java"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> <%@ page session="false"%> -" rel="stylesheet"> + <spring:message code="label.form.title"></spring:message> -
- -
+
+
+

+ +

+
+
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ "> +
+
+ + + \ No newline at end of file