In spring I have the url:--
http://localhost:8080/SpringMvc/viewdetail/id?key=1
I want to fetch the "key" value
So,I have done:--
@RequestMapping(value = "/viewdetail/id",method=RequestMethod.GET,
params={"key"})
public @ResponseBody String viewDetail11(Map<String, Object> map,
HttpServletRequest request,
@RequestParam(value = "key") int key) throws IOException{
detailservice.detail(key);
return "viewdetail";
}
But,with this code I am not getting any value.why?