![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
request
ZOEylchen
le
展开
-
response和request编码
编码 常见字符编码:iso-8859-1(不支持中文)、gb2312 gbk gb18030(系统默认编码,中国的国标码) utf-8(万国码,支持全世界的编码,所以我们使用这个)1.响应编码 当使用response.getWrite()向客户端发送字符数据时候,如果在之前没有设置编码,那么默认使用iso,因为iso不支持中文,所以一定会乱码。 在使用resp原创 2017-02-23 22:59:04 · 522 阅读 · 0 评论 -
request
第5天 request 1. 获取客户端IP、获取请求方式、获取Agent String addr=request.getRemoteAddr(); System.out.println("IP:"+addr); String method=request.getMethod(); System.out.println("method:"+me原创 2017-02-23 16:12:10 · 372 阅读 · 0 评论