EAP 6.1.0 以降に移行すると JSF アプリケーションのレスポンスの文字セットエンコーディングが変更する

Solution Unverified - Updated -

Issue

  • EAP 6.1.0 以降に以降すると、JSF アプリケーションのレスポンスの文字セットエンコーディングが変更になりました。

  • 各ページに <?xml version="1.0" encoding="Windows-31J" ?> を指定する JSF アプリケーションがあります。ただし、JSF アプリケーションのレスポンスの Content-Type ヘッダーの charset エンコーディングが、EAP 6.0.x と EAP 6.1.0 以降とで異なります。

    • EAP 6.0.x では、Content-Type:text/html;charset=Windows-31J が返されました。

      $ 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
      < ...
      
    • EAP 6.1 以降では、 Content-Type:text/html;charset=UTF-8 が返されます。

      $ 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
      < ...
      

    この動作が変更したのはなぜですか? JSF アプリケーションに文字セットを指定するにはどうしたら良いですか?

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.