JSF application's response charset enconding was changed after migrating to EAP 6.1.0 onwards

Solution Unverified - Updated -

Issue

  • JSF application's response charset enconding was changed after migrating to EAP 6.1.0 onwards

  • I have a JSF application which specify <?xml version="1.0" encoding="Windows-31J" ?> in each page. However, charset encoding in JSF application's Response Content-Type header becomes different between in EAP 6.0.x and in EAP 6.1.0 onwards.

    • In EAP 6.0.x, Content-Type:text/html;charset=Windows-31J was returned:

      $ curl -v http://localhost:8080/example/faces/example.xhtml
      > GET /example/faces/example.xhtml HTTP/1.1
      > User-Agent: curl/7.29.0
      > Host: localhost:8080
      > Accept: */*
      > 
      < HTTP/1.1 200 OK
      < Server: Apache-Coyote/1.1
      < ...
      < Content-Type: text/html;charset=Windows-31J
      < ...
      
    • In EAP 6.1 onwards, Content-Type:text/html;charset=UTF-8 was returned:

      $ curl -v http://localhost:8080/example/faces/example.xhtml
      > GET /example/faces/example.xhtml HTTP/1.1
      > User-Agent: curl/7.29.0
      > Host: localhost:8080
      > Accept: */*
      > 
      < HTTP/1.1 200 OK
      < Server: Apache-Coyote/1.1
      < ...
      < Content-Type: text/html;charset=UTF-8
      < ...
      

    What caused this behavior change? How can I specify charset in JSF application?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6.x
  • JSF

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.