I am taking variable names from a path variable in my spring application.
However that fails in some cases when URL contains special characters
For eg http://www.loudletters.com/ll/rest/celebrityprofile/2S/Jan%20Min%C3%83%C2%A1%C3%85%C2%99 gives page not found error.
How to handle this?
I handle UTF-8 path variables just fine. What you need to do is:
CharacterEncodingFilter
) The encoding and decoding should be done automatically by the servlet container and the browser.
您是否考虑过使用java.net.URLDecoder
和java.net.URLEncoder
?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.