aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/java/com/juick/www/controllers
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-12-12 16:58:18 +0700
committerGravatar Vitaly Takmazov2016-12-12 22:49:47 +0300
commitd446ba75acc05ec331540d51348bdc2be5aecb42 (patch)
tree445814fcf456999e9955c3570c381bdced015eab /juick-spring-www/src/main/java/com/juick/www/controllers
parent02979491ee071371bdbcc1e6ed813ffd44b5834b (diff)
rtemplate refactoring: layout templates moved to layout directory;
show error message on login error
Diffstat (limited to 'juick-spring-www/src/main/java/com/juick/www/controllers')
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java
index 6f25844f..4df4d350 100644
--- a/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java
+++ b/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java
@@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -121,6 +122,12 @@ public class IndexController {
@RequestMapping(value = "/login", method = RequestMethod.GET)
public String getLoginForm() {
- return "views/login";
+ return "layout/login";
+ }
+
+ @RequestMapping(value = "/login-error", method = RequestMethod.GET)
+ public String getLoginErrorForm(Model model) {
+ model.addAttribute("loginError", true);
+ return "layout/login";
}
} \ No newline at end of file