Spring MVC referencing params variable from RequestMapping

Posted by NomNomNom on Stack Overflow See other posts from Stack Overflow or by NomNomNom
Published on 2011-02-15T07:24:22Z Indexed on 2011/02/15 7:25 UTC
Read the original article Hit count: 112

Filed under:
|
|
|

Hi guys,

I have the method below:

@RequestMapping(value = "/path/to/{iconId}", params="size={iconSize}", method = RequestMethod.GET)
public void webletIconData(@PathVariable String iconId, @PathVariable String iconSize, HttpServletResponse response) throws IOException {
    // Implementation here
}

I know how to pass the variable "webletId" from the RequestMapping using the @PathVariable, but how do I reference the variable "iconSize" from params? The same way?

Thanks a lot.

© Stack Overflow or respective owner

Related posts about java

Related posts about spring