Answers for "neither bindingresult nor plain target object for bean name spring mvc"

0

neither bindingresult nor plain target object for bean name spring mvc

// In the controller, you need to add the object as an attribute of the model:
	model.addAttribute("login", new Login());
// Like this:
@RequestMapping(value = "/", method = RequestMethod.GET) 
public String displayLogin(Model model) { 
    model.addAttribute("login", new Login()); 
    return "login"; 
}
Posted by: Guest on July-16-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language