1. 程式人生 > >java web 亂碼解決

java web 亂碼解決

response亂碼解決        

            response.setContentType("text/html;charset=utf-8");

request亂碼解決

               request.setCharacterEncoding("utf-8");

跨域問題
        response.setHeader("Access-Control-Allow-Origin", "*");