-
1. Re: What is WildFly's default encoding and how to set another encoding for WildFly?
ctomc May 5, 2014 5:44 AM (in response to hai_feng)You configured encoding properly. As far as WildFly configuration goes.
but, your debugging process is flawed.
you are testing servlet encoding outputs but you are outputting to system out, where encoding has noting to do with servlet or WildFly at all.
you should make sure that your console support UTF encoding and make sure your compiler is configured to compile using UTF8.
what you are testing could be tested by simple public static void main app no need for servlets.
To test servlets encoding try writing to servlet's response writer / outputstream and see it in browser.
--
tomaz
-
2. Re: What is WildFly's default encoding and how to set another encoding for WildFly?
hai_feng May 5, 2014 11:28 PM (in response to ctomc)Hi Tomaz Cerar
Thanks replying to me,the same as you say,because my console's encode isn't utf-8,so it can't show chinese.I modify it to utf-8 and it show formally.
Now,I want to make sure one thing.If my project's encode is GBK,I can modify the WildFly’s encoding by this way as following?
Setting default-encoding to "GBK"
Is it the correct way to modify WildFly uri encoding?Does it work?
I know on the JBoss As 7,we can configure it by modify standalone.xml as following:
<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>
But I don't how to set it on WildFly,please tell me a exactly answer,thanks!
-
3. Re: What is WildFly's default encoding and how to set another encoding for WildFly?
hai_feng May 8, 2014 10:43 PM (in response to ctomc)1 of 1 people found this helpfulThanks Tomaz
I know what you say,and i test successfully.