Commit 6148d3514489d5f96c65c76c1303e5c491b75590
1 parent
322c9502
Fixing message in login page
Showing
3 changed files
with
17 additions
and
15 deletions
Show diff stats
pom.xml
@@ -28,10 +28,6 @@ | @@ -28,10 +28,6 @@ | ||
28 | <groupId>org.springframework.boot</groupId> | 28 | <groupId>org.springframework.boot</groupId> |
29 | <artifactId>spring-boot-starter-data-jpa</artifactId> | 29 | <artifactId>spring-boot-starter-data-jpa</artifactId> |
30 | </dependency> | 30 | </dependency> |
31 | - <dependency> | ||
32 | - <groupId>org.springframework.boot</groupId> | ||
33 | - <artifactId>spring-boot-starter-data-rest</artifactId> | ||
34 | - </dependency> | ||
35 | <dependency> | 31 | <dependency> |
36 | <groupId>org.springframework.boot</groupId> | 32 | <groupId>org.springframework.boot</groupId> |
37 | <artifactId>spring-boot-starter-web</artifactId> | 33 | <artifactId>spring-boot-starter-web</artifactId> |
@@ -64,6 +60,21 @@ | @@ -64,6 +60,21 @@ | ||
64 | <artifactId>h2</artifactId> | 60 | <artifactId>h2</artifactId> |
65 | <scope>runtime</scope> | 61 | <scope>runtime</scope> |
66 | </dependency> | 62 | </dependency> |
63 | + <dependency> | ||
64 | + <groupId>org.webjars</groupId> | ||
65 | + <artifactId>webjars-locator</artifactId> | ||
66 | + <version>0.30</version> | ||
67 | + </dependency> | ||
68 | + <dependency> | ||
69 | + <groupId>org.webjars.npm</groupId> | ||
70 | + <artifactId>jquery</artifactId> | ||
71 | + <version>3.2.1</version> | ||
72 | + </dependency> | ||
73 | + <dependency> | ||
74 | + <groupId>org.webjars.npm</groupId> | ||
75 | + <artifactId>bootstrap</artifactId> | ||
76 | + <version>3.3.7</version> | ||
77 | + </dependency> | ||
67 | </dependencies> | 78 | </dependencies> |
68 | 79 | ||
69 | <build> | 80 | <build> |
src/main/java/fr/plil/sio/web/mvc/LoginController.java
@@ -14,7 +14,7 @@ public class LoginController { | @@ -14,7 +14,7 @@ public class LoginController { | ||
14 | ModelAndView modelAndView = new ModelAndView("login"); | 14 | ModelAndView modelAndView = new ModelAndView("login"); |
15 | 15 | ||
16 | if (error != null) { | 16 | if (error != null) { |
17 | - modelAndView.addObject("error", "Your username and password is invalid."); | 17 | + modelAndView.addObject("message", "Your username and password is invalid."); |
18 | } | 18 | } |
19 | 19 | ||
20 | if (logout != null) { | 20 | if (logout != null) { |
src/main/webapp/WEB-INF/pages/login.jsp
@@ -7,16 +7,7 @@ | @@ -7,16 +7,7 @@ | ||
7 | <body> | 7 | <body> |
8 | <c:url value="/login" var="loginUrl"/> | 8 | <c:url value="/login" var="loginUrl"/> |
9 | <form action="${loginUrl}" method="post"> | 9 | <form action="${loginUrl}" method="post"> |
10 | - <c:if test="${param.error != null}"> | ||
11 | - <p> | ||
12 | - Invalid username and password. | ||
13 | - </p> | ||
14 | - </c:if> | ||
15 | - <c:if test="${param.logout != null}"> | ||
16 | - <p> | ||
17 | - You have been logged out. | ||
18 | - </p> | ||
19 | - </c:if> | 10 | + <b><c:out value="${message}"></c:out></b> |
20 | <p> | 11 | <p> |
21 | <label for="username">Username</label> | 12 | <label for="username">Username</label> |
22 | <input type="text" id="username" name="username"/> | 13 | <input type="text" id="username" name="username"/> |