您的位置:首页 > 理论基础 > 计算机网络

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

2014-02-23 10:26 351 查看
本文参考:http://zhidao.baidu.com/question/212618937.html

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

response.setContentType("text/html;charset=gb2312");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: