My code is
@RequestMapping(value =”login”,method = RequestMethod.POST)
public String welcomepage(@RequestParam String name, @RequestParam String password ,ModelMap model){
model.put(“password”, password);
model.put(“name”, name);
return “welcomepage”;
}
Got below error
org.springframework.web.bind.MissingServletRequestParameterException: Required request parameter ‘password’ for method parameter type string is not present.
Could not resolve parameter [1] in public getting this in console.
tried with
public String welcomepage(@RequestParam String name, @RequestParam int id ,ModelMap model) have changed id parameter out of the method but not working.
Olivia DP is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.