Commit 6148d3514489d5f96c65c76c1303e5c491b75590

Authored by Julien Cartigny
1 parent 322c9502

Fixing message in login page

... ... @@ -28,10 +28,6 @@
28 28 <groupId>org.springframework.boot</groupId>
29 29 <artifactId>spring-boot-starter-data-jpa</artifactId>
30 30 </dependency>
31   - <dependency>
32   - <groupId>org.springframework.boot</groupId>
33   - <artifactId>spring-boot-starter-data-rest</artifactId>
34   - </dependency>
35 31 <dependency>
36 32 <groupId>org.springframework.boot</groupId>
37 33 <artifactId>spring-boot-starter-web</artifactId>
... ... @@ -64,6 +60,21 @@
64 60 <artifactId>h2</artifactId>
65 61 <scope>runtime</scope>
66 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 78 </dependencies>
68 79  
69 80 <build>
... ...
src/main/java/fr/plil/sio/web/mvc/LoginController.java
... ... @@ -14,7 +14,7 @@ public class LoginController {
14 14 ModelAndView modelAndView = new ModelAndView("login");
15 15  
16 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 20 if (logout != null) {
... ...
src/main/webapp/WEB-INF/pages/login.jsp
... ... @@ -7,16 +7,7 @@
7 7 <body>
8 8 <c:url value="/login" var="loginUrl"/>
9 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 11 <p>
21 12 <label for="username">Username</label>
22 13 <input type="text" id="username" name="username"/>
... ...