Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. model.addAttribute("error",ErrorMessages.USERLOGINERROR);
  2.  
  3. return "redirect:/userlogin";
  4.  
  5. if(name.equals("false")){
  6. System.out.println(ErrorMessages.USERLOGINERROR);
  7. model.addAttribute("error",ErrorMessages.USERLOGINERROR);
  8. return "redirect:/getuserloginpage";
  9. }
  10.  
  11. <form:form action="userlogin" method="post" commandname="login">
  12. <div align="center" style="color: red">${error}</div>
  13. <div align="center" style="color: red">${thanks}</div>
  14. ...
  15.  
  16. @RequestMapping(value="/someURL", method=GET)
  17. public String yourMethod(RedirectAttributes redirectAttributes)
  18. {
  19. ...
  20. redirectAttributes.addAttribute("rd", "rdValue");
  21. redirectAttributes.addFlashAttribute("fa", faValue);
  22. return "redirect:/someOtherURL";
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement