I have a controller with a RequestParam as a String, which is BASE64 encoded, and it includes many times the "+" character (something like "domain.com/request?code=sdfesdfd+23fewrfr3"). When I try to print the 'code' value whitin the controller method body, it prints the value replacing the "+" for a space " " (in the example, "sdfesdfd 23fewrfr3"). How can I avoid having this problem?
Asked
Active
Viewed 882 times
2 Answers
2
Run the string through the URLEncoder if you can...
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URLEncoder.html
... if you can't do that, try using percent encoding....

rgb130
- 90
- 8
-
Is this not what you are looking for? – rgb130 Jan 23 '13 at 16:19
-
I didnt solved this issue as ia had to change the codification assets and i stopped having urls like the given previously – Pasutor Esteban Camargo Iglesi Jan 12 '15 at 23:56