JBOSS7 encoding of Get mode in JBOSS7 Chinese characters

Source: Internet
Author: User
Tags jboss

Chinese garbled generally in the code to set the encoding method,

getResponse().setCharacterEncoding(Constant.CODE_UTF_8);getRequest().setCharacterEncoding(Constant.CODE_UTF_8);

But this is only valid for post, and for get it needs to be configured in the Web container, Tomcat configuration reference: http://blog.csdn.net/calmreason/article/details/44591029
JBoss is special, the previous version of 7 in a configuration file, the specific file name does not remember, but 7.0 does not support, reference: http://jbosscn.iteye.com/blog/1180591 This post of the six floor review
So we need to use JBoss7.1, the specific configuration is to add in the Jboss-as-7.1.0.final\standalone\configuration\standalone.xml

 </extensions ;  **< Span class= "Hljs-tag" ><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  =/>  </ system-properties ;  * * < management ;  

Reference: http://www.iflym.com/index.php/code/201212270001.html

JBOSS7 encoding of Get mode in JBOSS7 Chinese characters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.