Configure Tomcat to Allow Slash and Backslash in Page Names
Last modified by Eleni Cojocariu on 2026/05/20 16:51
Steps
To configure Tomcat to allow slashes (/) and backslashes (\) in Page names:
- Enable encoded slash support in Tomcat by adding the system property:
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true - Enable backslash support in Tomcat by adding the system property:
-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true - 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" - 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).
- 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.