浏览代码

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

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;
         }