httpServletRequest.setCharacterEncoding 、httpServletResponse.setCharacterEncoding详解
一、httpServletRequest.setCharacterEncoding():用来确保发往服务器的参数以汉字的编码来提取,设置从request中取得的值或从数据库中取出的值。如果没有提前指定,则会按照服务器端默认的“iso-8859-1”来进行编码;指定后可以通过request.getParameter()获取自己想要的字符串;该方法只对post请求有效,
原创
2017-03-17 19:10:53 ·
3250 阅读 ·
0 评论