tomcat设置URL为utf-8编码后获取到的URL参数中文转码不完全

我用的tomcat5.5,在server.xml中配置了URIEncoding="utf-8"属性,URL参数是“苏网维02-网管机房值班日志(班).xls”。

我是在jsp中接受这个参数的,但是冲request中取出的时候,参数却是“苏网�?2-网管机房值班日志(�?.xls”。

请高手解决。

 

javascript url 编码(UTF-8) jsp 解码
1. encode.html

document.write(encodeURI('http://www.blogjava.net/chenlb/abc 中文'));

2.
decode.jsp

    /*
     * <script language="JavaScript">
     * document.write(encodeURI('http://www.blogjava.net/chenlb/abc 中文'));
     * </script>
     */
    String url = "http://www.blogjava.net/chenlb/abc%20%E4%B8%AD%E6%96%87";
    try {
        System.out.println(URLDecoder.decode(url, "UTF-8"));
        System.out.println(URLDecoder.decode(url, "GBK"));//乱码
    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    }

你在提交之前的jsp里面

" />打开文件

然后在x.jsp里面

String name = URLDecoder.decode(request.getP...("name"),"UTF-8");