I\'ve been retrofitting an existing webapp with Spring. Clearly it\'s easier to start with Spring than to add it on later.
We have servlets that can take multiple reque
Your request mapping needs to map an actual URL rather then just the HTTP method. You can also put required params on a per method basis like so...
@RequestMapping(value="/doSomething", method=RequestMethod.GET, params=["prod", "owner"])
public ModelAndView doIt(@RequestParam("prod") int prod,
@RequestParam("owner") int owner,
Model model)
{
ModelAndView mav = new ModelAndView();
mav.setViewName("jsonView");
return mav;
}