@RequestMapping(value = "/test") public String home7(ModelMap model) { model.addAttrubute("user", new User()); model.addAttrubute("test", new Test()); return "test"; } @RequestMapping(value = "/test", method = RequestMethod.POST) public String home71(ModelMap model, @ModelAttribute("user") User user, @ModelAttribute("test") Test test) { return "welcome"; } When sending a POST request, the user and test are reset to zero for some reason. Probably, I just don’t pass them on the form. (Because I don’t know how) Or maybe the approach is wrong. So, how can I pass user and test post objects with a request?
Please help or poke at least in the right direction to find a solution. thanks in advance