URL Configuration Properties

Last modified by Eleni Cojocariu on 2026/11/03 17:22

Reference

The configuration keys that decide which URLs XWiki accepts and which URLs it generates. The How-tos under Short URLs are what set them.

Two files are involved, and they do not do the same thing. The xwiki.cfg keys are what XWiki's URL factory reads when it generates a URL. The url.standard.* keys of xwiki.properties act on the way an incoming URL is read, when they are read at all, so none of them changes the URLs the wiki puts in its pages.

The comments shipped in the configuration file itself say otherwise, presenting two of these keys as replacements for their older counterparts, and a third key is read under the name of another. Both defects are tracked as XWIKI-25636.

PropertyFileDefaultWhat it does
xwiki.webapppathxwiki.cfgtaken from the request URLThe application name used in generated URLs. An empty value removes it.
xwiki.servletpathxwiki.cfgtaken from the request URLA hard override of the servlet mapping in generated URLs, written with a trailing slash and no leading one. A short-URL setup uses xwiki.defaultservletpath instead.
xwiki.defaultservletpathxwiki.cfgbin/The fallback servlet mapping, used when it cannot be determined from the request URL, which is the case behind a reverse proxy. An empty value drops bin from generated URLs.
url.standard.entityPathPrefixxwiki.propertiesbinNothing reads this key, so setting it changes no URL at all. The prefix XWiki recognises as introducing an entity path is taken from url.standard.multiwiki.wikiPathPrefix instead, falling back to xwiki.defaultservletpath, which is why the default still works.
xwiki.showviewactionxwiki.cfg1Whether the view action appears in generated URLs. Set it to 0 to omit it.
url.standard.hideViewActionxwiki.propertiesfalseDeclared in xwiki.properties as the replacement for xwiki.showviewaction, but no code reads its value, so setting it has no effect.
url.standard.multiwiki.wikiPathPrefixxwiki.propertieswikiThe path segment that precedes the name of a path-based subwiki in the URLs XWiki accepts. Changing it means changing the matching action servlet mapping in web.xml too, and the page URLs XWiki generates keep wiki/ whatever its value. It also sets the entity path prefix that the key above is named for, so giving it any other value stops bin from being recognised and every page URL answers 404.

FAQ

Which value wins if I set both keys of a pair?

The xwiki.cfg one, in both of the pairs above. The intended design is the opposite for an incoming URL, the xwiki.properties key winning with the xwiki.cfg value as its default, but neither url.standard. key of the table takes effect, so what the instance obeys is xwiki.showviewaction and xwiki.defaultservletpath. For the URLs XWiki generates, the xwiki.cfg key is the only one consulted in every case.

Is there an xwiki.properties key for the application name?

No. xwiki.webapppath exists only in xwiki.cfg.

Related

Get Connected