HttpServletResponse 乱码问题

    xiaoxiao2021-04-02  32

    三种方法: 1. 设置response使用的码表,以控制response以什么码表向浏览器写出数据 resp.setCharacterEncoding(“UTF-8”); 2.指定浏览以什么码表打开数据、、 resp.setHeader(“content-type”, “text/html;charset=utf-8”); 3,用HTML标签模拟响应头 ServletOutputStream out =resp.getOutputStream(); out.write(“”.getBytes());

    转载请注明原文地址: https://ju.6miu.com/read-665816.html

    最新回复(0)