Configure Tomcat to Allow Slash and Backslash in Page Names

Last modified by Eleni Cojocariu on 2026/05/20 16:51

Content

Steps

Warning

WIP

To configure Tomcat to allow slashes (/) and backslashes (\) in Page names:

  1. Enable encoded slash support in Tomcat by adding the system property:
    -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
  2. Enable backslash support in Tomcat by adding the system property:
    -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true
  3. Add both properties to CATALINA_OPTS to make the configuration persistent:
    CATALINA_OPTS="$CATALINA_OPTS \
    -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
    -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"
  4. Configure CATALINA_OPTS in your environment using the appropriate mechanism for your system (for example setenv.sh, setenv.bat, or system-wide Tomcat configuration files).
  5. Restart Tomcat to apply the changes.

FAQ

Why do I need to enable these Tomcat properties?

Tomcat blocks encoded slashes / and backslashes \ (%2F or %5C in URLs) characters by default for security reasons, which prevents XWiki from using them in Page names.

Get Connected