I have an application using spring -mvc 3.0. The controllers are configured as follows:
@RequestMapping(value = "/update", method = RequestMethod.POST) public ModelAndView updateValues( @RequestParam("einvoiceId") String id){ ...}
When sending an identifier containing special characters (in this case pipe |) url-encoded with UTF-8 (id = 000025D26A01% 7C2014174), the row identifier will contain% 7C. I was expecting spring -mvc to url decrypt the parameter. I know that I can solve this using
java.net.URLDecoder.decode()
but since I have a large number of controllers, I would like this to be done automatically using the framework. I configured the Tomcat connector with URIEncoding="UTF-8" and configured CharacterEncodingFilter , but as I understand it, this will only affect GET requests. Any ideas on how I can make spring -mvc url decode my message parameters?
source share