Is it possible to create page with slash ("/") in name?

Hi!
Want to create page “Export/Import” but got error:

# HTTP Status 400 – Bad Request
**Type** Status Report
**Message** Invalid URI: noSlash
**Description** The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
### Apache Tomcat/9.0.16 (Debian)

Is it possible to create page with such title?

Regards, Vadim

oops, find https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationTomcat/#HAllowing222F22and225C22inpagenames link myself, will try now…

XWiki support it by default but the issue here is actually on tomcat side, see https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationTomcat/#HAllowing222F22and225C22inpagenames.

Note that in the coming 12.0 version we started to disable creating page with “/” by default (mostly because of too many WTF reports caused by Tomcat silly default configuration) but it’s configurable.

Thank you Thomas!
If it will be deprecated in 12+ versions It is more safe not to use such symbols in page names…

Regards, Vadim

Note that I’m refering to page name (which end up in the URL) and not the page title which will still allow anything and which is what you see most of the time (you can control both separately when you are advanced user in your user preferences).

Also the idea is not really to deprecate it, just prevent it by default to avoid any problem caused by things like Tomcat but we don’t plan to drop the current “you can put anything in page reference” XWiki philosophy anytime soon.

We migrated another xwiki into ours with an xar import. A lot later we recognize some articles with a slash in the url and our tomcat isn’t set as recommended in your docs. We admins can’t change the server.

So I tried another approach:

#set ($source = $services.model.resolveDocument('Path.To.Source / Slash included.WebHome'))
#set ($destination = $services.model.resolveDocument('Path.To.Destination NO slash.WebHome'))
#set ($moveRequest = $services.refactoring.requestFactory.createMoveRequest($source, $destination)) 
$services.refactoring.move($moveRequest)).join()

But that isn’t working. Is there something more I can try?

I think that should work fine. Maybe your references are not correct?

See also https://snippets.xwiki.org/xwiki/bin/view/Extension/Rename%20Pages%20with%20special%20charcters/

Found that snippet by myself (the snippet section is a gold mine) but it did not work as expected. The sources were all terminated pages. The new ones were created but the old ones not deleted. And the new ones were w/o content.

At the end I exported and imported them in a local jetty xwiki where I could view and rename them. Then I deleted the old ones in our wiki with snippets found at https://extensions.xwiki.org/xwiki/bin/view/Extension/Refactoring%20Module.