Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use charset string, no need to check for supported charSets

  • Loading branch information...
commit 9d147a1be5cfabe1c51329474fe070ea269bec0a 1 parent ba6a8e3
@grobmeier authored
View
11 jjson-struts2/src/main/java/de/grobmeier/json/plugins/struts2/JsonResult.java
@@ -65,18 +65,11 @@ public JsonResult(String location) {
@Override
protected void doExecute(String finalLocation, ActionInvocation invocation)
throws Exception {
- Charset charset = null;
- if (charSet != null) {
- if (Charset.isSupported(charSet)) {
- charset = Charset.forName(charSet);
- } else {
- charset = null;
- }
- }
-
HttpServletResponse response = (HttpServletResponse) invocation
.getInvocationContext().get(HTTP_RESPONSE);
+ response.setCharacterEncoding(charSet);
+
if (this.commentOutput) {
response.setContentType("text/ext-json");
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.