How to get parameter Chinese to avoid garbled __tomcat with El expression ${param.xxx} properties under Tomcat

Source: Internet
Author: User

How to obtain parameter with the EL expression ${param.xxx} property under Tomcat to avoid garbled characters

1, find Tomcat according to the path under the Conf folder under the Server.xml

Example:

  F:\tomact\apache-tomcat-6.0.36\conf\server.xml

2, find

  <connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000"

             redirectport=

"8443" uriencoding= "GBK"/>

3, at this time if the above settings found, the page submitted the Chinese parameters are not a problem, but not the Chinese parameters can not be passed to the background, Then look at the beginning of the JSP page encoding settings with the top server.xml uriencoding consistent, inconsistent words need to modify the Server.xml uriencoding configuration and JSP consistent.

<%@ page language= "java" contenttype= "text/html; charset=gb18030 "pageencoding=" GB18030 "%>

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.