Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- model.addAttribute("error",ErrorMessages.USERLOGINERROR);
- return "redirect:/userlogin";
- if(name.equals("false")){
- System.out.println(ErrorMessages.USERLOGINERROR);
- model.addAttribute("error",ErrorMessages.USERLOGINERROR);
- return "redirect:/getuserloginpage";
- }
- <form:form action="userlogin" method="post" commandname="login">
- <div align="center" style="color: red">${error}</div>
- <div align="center" style="color: red">${thanks}</div>
- ...
- @RequestMapping(value="/someURL", method=GET)
- public String yourMethod(RedirectAttributes redirectAttributes)
- {
- ...
- redirectAttributes.addAttribute("rd", "rdValue");
- redirectAttributes.addFlashAttribute("fa", faValue);
- return "redirect:/someOtherURL";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement