-
1. Re: WildFly 10 - How to change default encoding?
ctomc Mar 28, 2017 8:36 AM (in response to narft)jax-rs resources are not servlet resources, that is why config change you did does not apply.
what is the version of wildfly you are using?
-
2. Re: WildFly 10 - How to change default encoding?
narft Mar 28, 2017 8:50 AM (in response to ctomc)Hi Tomasz,
I am using the following version / Wildfly configuration.
Product name:WildFly Full
Product version:10.1.0.Final
Profile:COMMUNITY
HAL version:2.8.27.Final
Core version:2.8.27.Final
Standalone Server Configurations: standalone.xml Thank you in advance.
Niklas
-
3. Re: WildFly 10 - How to change default encoding?
jackie_tsai Mar 29, 2017 11:43 PM (in response to narft)You can add a filter for setting charactor encoding as "utf-8", it makes sense in my case.
Sure,If you still want to change setting for that,you can add config to standalone.xml as follows:
<servlet-container name="default" default-encoding="UTF-8">
<system-properties>
<property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/> <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
</system-properties>
The second section is only used for get request.
-
4. Re: WildFly 10 - How to change default encoding?
ctomc Mar 30, 2017 8:31 AM (in response to jackie_tsai)jackie tsai wrote:
<system-properties>
<property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/> <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
</system-properties>
The second section is only used for get request.
Properties named org.apache.catalina.* are no longer used in WildFly since it using undertow web server from version 8 onwards.
what are you guys looking for is setting on *-listener named uri-encoding
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true" url-charset="UTF-8"/>
and similar for all other listeners you might be using.
-
5. Re: WildFly 10 - How to change default encoding?
kranthides May 19, 2017 2:05 PM (in response to ctomc)Hi Tomaz,
Facing the similar issue. I tried to update standalone.xml using the following CLI command. But still now working.
/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=url-charset,value="utf-8")