Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我可以重定向到JSF中包含unicode字符的URL吗?_Url_Unicode_Jsf 2.2 - Fatal编程技术网

我可以重定向到JSF中包含unicode字符的URL吗?

我可以重定向到JSF中包含unicode字符的URL吗?,url,unicode,jsf-2.2,Url,Unicode,Jsf 2.2,我可以这样重定向吗: FacesContext context= FacesContext.getCurrentInstance(); String contextPath = context.getExternalContext().getRequestContextPath(); context.getExternalContext().redirect(contextPath+"/taşıma"); 当URL重写规则中已经定义了contextPath/taşıma时? 当我进入URLco

我可以这样重定向吗:

FacesContext context= FacesContext.getCurrentInstance();
String contextPath = context.getExternalContext().getRequestContextPath();
context.getExternalContext().redirect(contextPath+"/taşıma");
当URL重写规则中已经定义了
contextPath/taşıma
时?
当我进入URL
contextPath/taşıma
时,它会进入页面
transportation.xhtml
,没有问题,但在重定向中它没有问题。

可以使用
urlcoder

context.getExternalContext().redirect(contextPath+"/"+URLEncoder.encode(stringToEncode, "UTF-8"));