The method setCharacterEncoding(String) is undefined for the type HttpServletResponse

来源:互联网 发布:淘宝版本过低怎么升级 编辑:程序博客网 时间:2024/06/13 19:37

本文参考:http://zhidao.baidu.com/question/212618937.html


response.setCharacterEncoding("gb2312"); 在Servlet2.3中是不行的,至少要2.4版本才可以,如果低于2.4版本,可以用如下办法: 

response.setContentType("text/html;charset=gb2312");
0 0
原创粉丝点击