legacy-knowledge-base
公開されました Jun. 30, 2025

「リクエストターゲットに無効な文字が見つかりました。

written-by

Giulianna Munoa

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 特殊文字を含むURLにアクセスしようとすると、ページの読み込みに失敗し、 HTTP Status 400 - Bad Request Tomcatページが表示されます。
  • また、以下のログも見られる:
java.lang.IllegalArgumentException: Invalid character found in the request target [/<CLIENT URL CONTAINING SPECIAL CHARACTER>]. 
The valid characters are defined in RFC 7230 and RFC 3986 at
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:494) at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271) at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891) at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1703) at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at
org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1190) at
org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:634) at
org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:612) at
java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127) at
java.base/sun.nio.ch.Invoker$2.run(Invoker.java:219) at
java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at
java.base/java.lang.Thread.run(Thread.java:829)

Environment

  • Liferay LXC-SM 7.3+

解決策

  • これは、クライアントがデフォルトではサポートされていない特殊文字を使用しているために起こります。
  • パーサー設定を変更するには、 server.xml ファイルを修正し、以下を追加する必要がある:
relaxadoPathChars="[]|"
relaxadoQueryChars="[]|{}^\`"<>"
  • LXC-SM の場合、このファイルは $REPO/liferay/configs/$ENVIRONMENT/tomcat/conf/server.xml にあるので、デプロイして変更してください。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base