Przeglądaj źródła

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

KeYuan 6 lat temu
rodzic
commit
60a6bd435b

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