![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
doGet
xiaosha_
不想做咸鱼……努力挣扎……
展开
-
关于java中servlet使用Write乱码问题
1)更好 会让浏览器自动调整解码的编码response.setContentType("text/html;charset=utf-8");2)不太好 不会让浏览器自动改变解码的码表 有时候还是乱码response.setContentType("text/html");response.setCharacterEncoding("utf-8");原创 2017-08-16 09:36:35 · 238 阅读 · 0 评论 -
JavaEE关于全局参数的
在web.xml中 AAA AAA'Value BBB BBB'Value 在servlet中 ServletContext context = this.getServletContext(); Enumeration enums = context.getInitParameterNames(); while (enums.ha原创 2017-08-20 09:55:34 · 419 阅读 · 0 评论 -
关于java里面servlet获取参数乱码问题
对于doPost.request.setCharacterEncoding("utf-8");对于doGet 手动解码value=new String(value.getBytes("iso-8859-1","utf-8"));原创 2017-08-16 08:01:13 · 475 阅读 · 0 评论