Character Encoding Issue Due to Enabled Request Dumper Valve in Tomcat

症状

When running the encoding test, gibberish characters are shown (Iñtërnâtiônà lizætiøn), as can be seen in the following screenshot. The encoding test fails in the first test (i.e form submission).

原因

The Request Dumper Valve option in Tomcat's server.xml is enabled. From Apache documentation, Request Dumper Valve has some side-effects:

The output from this valve includes any parameters included with the request. The parameters will be decoded using the default platform encoding. Any subsequent calls to request.setCharacterEncoding() within the web application will have no effect.

ソリューション

  • Open server.xml in <confluence-install>/conf folder
    Comment out or delete the following line:

    <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
  • Confluence を再起動します。
最終更新日: 2016 年 2 月 26 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.