Like in Spring we have httpServeletRequest.getParameter("key") as an alternative to @RequestParam("key"), do we have any alternative to @ModelAttribute("key") ?
model.addAttribute("student",new Student()); ... ... @RequestMapping("/processStudentForm") public String processTheForm( @ModelAttribute("student") Student student ) { ... } Do we have something like?
public String processTheForm( Model model ) { Student student = model.getAtribute("key"); ... } Update 1
@RequestMapping("/showStudentForm") public String showTheForm(Model model) { model.addAttribute("key",new Student()); return "studentForm"; } <form:form action='processStudentForm' modelAttribute='key' method='post'> ... </form:form> I am binding the form values into student object. How to access this model attribute through request object??