WW-4391 FreemarkerResult uses response content encoding in first place

This commit is contained in:
Lukasz Lenart
2014-08-21 20:58:10 +02:00
parent 6d62aaedb4
commit 1a034053bc
@@ -343,7 +343,10 @@ public class FreemarkerResult extends StrutsResultSupport {
contentType = "text/html";
}
String encoding = template.getEncoding();
String encoding = response.getCharacterEncoding();
if(encoding == null) {
encoding = template.getEncoding();
}
if (encoding != null) {
contentType = contentType + "; charset=" + encoding;