![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javaee
文章平均质量分 80
qq_23476319
这个作者很懒,什么都没留下…
展开
-
request,response 乱码问题
* 课程回顾: * Servlet技术 * Servlet是一个小的java程序,运行在服务器端,接收和响应从客户端发送过来的请求。 * 开发Servlet步骤 * 编写一个类,实现Servlet接口,重写5个方法。 * 在web.xml中进行配置 servlet名称转载 2016-05-02 19:32:19 · 446 阅读 · 0 评论 -
Springmvc 4.x利用@ResponseBody返回Json数据
点击打开链接 下面是官方文档对于@ResponseBody注解的解释: [plain] view plain copy Mapping the response body with the @ResponseBody annotation The @ResponseBody annotation is similar to @RequestBody. This转载 2016-12-06 17:02:56 · 425 阅读 · 0 评论 -
JavaWeb的各种中文乱码终极解决方法
一、Servlet输出乱码 1. 用servlet.getOutStream字节流输出中文,假设要输出的是String str ="钓鱼岛是中国的,无耻才是日本的"。 1.1 若是本地服务器与本地客户端这种就不用说了,直接可以out.write(str.getBytes())可以输出没有问题。因为服务器中用str.getBytes()是采用默认本地的编码,比如GBK。而浏览器也解析时也用本地默转载 2016-12-24 10:45:00 · 1035 阅读 · 0 评论