2

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?
Fábio
  • 3,291
  • 5
  • 36
  • 49

2 Answers2

3

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.

siom
  • 1,610
  • 1
  • 14
  • 21
0

In some cases request sent before specifying encoding so server encodes it with server's default encoding.

  • default encoding of wildfly is ISO-8859-1, till wildfly25.
  • the convention is: encoding is specified by request header, if not the server's default will be used. you can set it for wildfly 24+ by

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

  • answered
Bashar Issa
  • 101
  • 2
  • 4