Skip to content
Browse files

use charset string, no need to check for supported charSets

  • Loading branch information...
1 parent ba6a8e3 commit 9d147a1be5cfabe1c51329474fe070ea269bec0a @grobmeier committed
Showing with 2 additions and 9 deletions.
  1. +2 −9 jjson-struts2/src/main/java/de/grobmeier/json/plugins/struts2/JsonResult.java
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 {

0 comments on commit 9d147a1

Please sign in to comment.
Something went wrong with that request. Please try again.