2023年11月16日
摘要: 将一个对象转化为字符称为序列化 调用serialize方法 其他序列化格式 反序列化的过程可以修改类中的值 阅读全文
posted @ 2023-11-16 21:21 na2co3- 阅读(1) 评论(0) 推荐(0) 编辑
摘要: Response响应字符数据 //text/html解码html,charset解码汉字response.setContentType("text/html;charset=utf-8");//1、获取字符输入流PrintWriter writer = response.getWriter();wr 阅读全文
posted @ 2023-11-16 20:44 na2co3- 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Response设置响应数据功能 Response完成重定向 重定向(Redirect):一种资源跳转方式 *redirect一定地址是8080往后补的,一定要写全 也可以是外部地址 路径问题: 动态获取虚拟目录 //动态获取虚拟目录String contextPath = request.getC 阅读全文
posted @ 2023-11-16 19:02 na2co3- 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 请求转发 阅读全文
posted @ 2023-11-16 16:16 na2co3- 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 只要添加编码方式就可以解决POST中的乱码问题 //1、解决POST乱码问题 request.setCharacterEncoding("UTF-8"); //2、获取username String username = request.getParameter("username"); Syste 阅读全文
posted @ 2023-11-16 16:00 na2co3- 阅读(22) 评论(0) 推荐(0) 编辑