java - Spring MVC @RequestMapping change character of url in redirect -


i have spring-mvc method request mapping this:

@requestmapping("/person/{personid}/**") 

in jsp set url :

/person/2/اکبر اکبری 

and no problem.

when in other method of controller , redirecting url address bar of browser shows this:

/person/2/??? ??? 

what wrong?what do?

you need encode special arabic characters when sending url browser, ascii characters can used:

string url = "/person/2/" + urlencoder.encode("اکبر اکبری", "utf-8"); 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -