JavaWeb響應亂碼和請求亂碼解決辦法

1、設置響應編碼格式: 在service中設置響應編碼格式 Response.setContentType(「text/html;charset=utf-8」) 2、設置請求編碼格式: 方法1:Post請求方式設置編碼格式 在service中設置request.setCharacterEncoding(「utf-8」); 方法2:Get請求方式設置編碼格式 在service中設置request.
相關文章
相關標籤/搜索