Wiki source code of Deploy XWiki as the Root Web Application
Last modified by Eleni Cojocariu on 2026/11/16 18:40
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
![]() |
4.2 | 1 | Deploy XWiki at the servlet container's root context so that its URLs stop carrying the ##/xwiki/## application name, the first of the three parts described in [[Short URLs>>doc:documentation.xs.admin.urls.short-urls.WebHome]]. |
![]() |
2.1 | 2 | |
| 3 | 1. Stop XWiki. | ||
| 4 | 1. Deploy the XWiki web application at the container's root context, whose name differs per container.((( | ||
| 5 | **Tomcat** | ||
| 6 | |||
| 7 | {{code language="none"}} | ||
| 8 | mv webapps/xwiki webapps/ROOT | ||
| 9 | {{/code}} | ||
| 10 | |||
| 11 | **Jetty** | ||
| 12 | |||
| 13 | {{code language="none"}} | ||
| 14 | mv webapps/xwiki webapps/root | ||
| 15 | {{/code}} | ||
| 16 | |||
| 17 | **XWiki Standalone distribution**, where ##webapps/root## already exists and holds a servlet that redirects the root URL to ##/xwiki/##, so remove it first | ||
| 18 | |||
| 19 | {{code language="none"}} | ||
| 20 | rm -r webapps/root | ||
| 21 | mv webapps/xwiki webapps/root | ||
| 22 | {{/code}} | ||
| 23 | ))) | ||
| 24 | 1. Set ##xwiki.webapppath## to an empty value in ##xwiki.cfg##.((( | ||
| 25 | {{code language="none"}} | ||
| 26 | xwiki.webapppath= | ||
| 27 | {{/code}} | ||
| 28 | ))) | ||
| 29 | 1. Start XWiki. | ||
| 30 | 1. Open any page and read its URL. The application name is gone, while the servlet mapping and the action are still there.((( | ||
| 31 | {{code language="none"}} | ||
| 32 | http://server.com/bin/view/Sandbox/WebHome | ||
| 33 | {{/code}} | ||
| 34 | ))) |
