Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3401

S2 JSON Plugin handles json content and contentType encoding differently

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.1.8.1
    • 2.3.1
    • Other
    • Windows and Red Hat 5

    Description

      Hi

      I'm using Struts 2 with Struts 2 JSON Plugin. When I deploy my application on a Linux box and the JVM file.encoding parameter is set to ISO-8859-1 the json content is generated as UTF-8 and the content type is application/json;charset=iso-8859-1. So to workaround this problem I set the defaultEncoding attribute to UTF-8 to fix it on Redhat Linux. But if I run this configuration on windows with the defaultEncoding attribute I get the json content with what it looks to be iso-8859-1 encoding and content type application/json;charset=utf-8.

      To replicate the problem on Windows you can set defaultEncoding to utf-8.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lukaszlenart Lukasz Lenart
            nestorjb Nestor Boscan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment