Tomcat支持特殊字符

举报
BitM 发表于 2019/09/24 22:21:32 2019/09/24
4.3k+ 0 0
【摘要】 support for special characters[edit]editing server.xml[edit]If you use OpenClinica out-of-the-box then you may experience some difficulties when it comes to special characters. For example you may ...

support for special characters[]

editing server.xml[]

If you use OpenClinica out-of-the-box then you may experience some difficulties when it comes to special characters. For example you may have users like Adèle or Amélie and when you search for them they don't show up in the results. This has to do with the fact that tomcat is not handling the characters correctly.

To fix this you must edit the server.xml (and first you must make a copy of your server.xml, like server_20170223.xml).

The places to look for are the connectors and these can be http and / or ajp You change: 

<Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

into

<Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />

and / or: 

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> 

into

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />

documentation[]

Documentation can be found at https://wiki.apache.org/tomcat/FAQ/CharacterEncoding

【声明】本内容来自华为云开发者社区博主,不代表华为云及华为云开发者社区的观点和立场。转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息,否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

作者其他文章

评论(0

抱歉,系统识别当前为高风险访问,暂不支持该操作

    全部回复

    上滑加载中

    设置昵称

    在此一键设置昵称,即可参与社区互动!

    *长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

    *长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。