Escaping & in a URL

前端 未结 4 2039
孤城傲影
孤城傲影 2021-01-11 23:42

I am using jsps and in my url I have a value for a variable like say \"L & T\". Now when I try to retrieve the value for it by using request.getParameter I

4条回答
  •  不要未来只要你来
    2021-01-12 00:30

    You can use UriUtils#encode(String source, String encoding) from Spring Web. This utility class also provides means for encoding only some parts of the URL, like UriUtils#encodePath.

提交回复
热议问题