mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
Patch WW-3945
Set default encoding for JSONResult to UTF-8 Now the default encoding is UTF-8 for JSON as should be.
This commit is contained in:
+5
-1
@@ -386,7 +386,11 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
|
||||
LOG.error("Error producing {} report for uri {}", format, systemId, e);
|
||||
throw new ServletException(e.getMessage(), e);
|
||||
} finally {
|
||||
conn.close();
|
||||
try {
|
||||
conn.close();
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Could not close db connection properly", e);
|
||||
}
|
||||
}
|
||||
|
||||
response.setContentLength(output.size());
|
||||
|
||||
@@ -80,7 +80,7 @@ public class JSONResult implements Result {
|
||||
public static final String DEFAULT_PARAM = null;
|
||||
|
||||
private String encoding;
|
||||
private String defaultEncoding = "ISO-8859-1";
|
||||
private String defaultEncoding = "UTF-8";
|
||||
private List<Pattern> includeProperties;
|
||||
private List<Pattern> excludeProperties;
|
||||
private String root;
|
||||
|
||||
Reference in New Issue
Block a user