mirror of
https://gitee.com/wkeyuan/DWSurvey.git
synced 2024-11-30 02:58:55 +08:00
解决发布答卷后,答卷可能出现的乱码问题
This commit is contained in:
parent
6c04feef34
commit
00bacedb64
@ -98,6 +98,10 @@ public class DwsAnswerAction extends ActionSupport {
|
||||
if (directory != null) {
|
||||
surveyId = directory.getId();
|
||||
String filterStatus = filterStatus(directory,request);
|
||||
|
||||
request.setCharacterEncoding("utf-8");
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
|
||||
if(filterStatus!=null){
|
||||
return filterStatus;
|
||||
}
|
||||
@ -148,12 +152,13 @@ public class DwsAnswerAction extends ActionSupport {
|
||||
SurveyDirectory directory = directoryManager.getSurvey(surveyId);
|
||||
if (directory != null) {
|
||||
String filterStatus = filterStatus(directory,request);
|
||||
request.setCharacterEncoding("utf-8");
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
if(filterStatus!=null){
|
||||
return filterStatus;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user