소스 검색

解决可能会出现的乱码问题

KeYuan 6 년 전
부모
커밋
60a6bd435b
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/main/java/com/key/dwsurvey/action/survey/DwsAnswerAction.java

+ 1 - 0
src/main/java/com/key/dwsurvey/action/survey/DwsAnswerAction.java

@@ -153,6 +153,7 @@ public class DwsAnswerAction extends ActionSupport {
             }
             String htmlPath = directory.getHtmlPath();
             htmlPath = htmlPath.substring(0,htmlPath.lastIndexOf("/"));
+            response.setContentType("text/html;charset=utf-8");
             request.getRequestDispatcher("/" + htmlPath+"/m_"+surveyId+".html").forward(request,response);
             return NONE;
         }