Search code examples
jbosscharacter-encodingwildflywildfly-10undertow

Charset Encoding in WildFly


All my application files were created using UTF-8 yet WildFly serves them as ISO-8859-1.

So I have a few questions:

  • does WildFly have a default charset?
  • how does WildFly choose the encoding used to set the charset response header?
  • what is the difference between default-encoding and url-charset attributes in the WildFly Undertow subsystem?

Solution

  • You can set the default encoding of Wildfly using the following command on the CLI:

    /subsystem=undertow/servlet-container=default:write-attribute(name="default-encoding" value="utf-8")
    

    url-charset is used for encoding/decoding the URL query parameters.