Hi all
I'm having a problem with a @RequestParam that gets passed in via querystring, and was hoping someone could point me in the right direction. The method signature looks like this:
From what I can see in the Spring docs, DispatcherServlet enables the DefaultAnnotationHandlerMapping which decodes the servlet path (see http://static.springsource.org/sprin...handlermapping). Does this also automatically decode @RequestParam values before passing them to the handler method ("viewUser" in this case).Code:@RequestMapping(value="/view.html", method=RequestMethod.GET) public String viewUser(@RequestParam("username") String username, Model model) { ... }
To be more specific, I'm passing the username in the querystring - but the username may contain characters like ü (encoded as %FC in the URL).
So my question is: How do I get this value provided in its decoded form?
Thanks very much
EDIT: I'm using v3.0.3 - just in case that question arises.
EDIT2: I've also configured the CharacterEncodingFilter to use UTF-8 in web.xml


Reply With Quote