SHARE
TWEET

Untitled

a guest Jul 16th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top