Wiki source code of Configure Tomcat

Last modified by Eleni Cojocariu on 2026/11/25 19:37

Show last authors
1 To install and configure Tomcat as your servlet container for XWiki:
2
3 1. Download a [[supported version of Tomcat>>dev:Community.SupportStrategy.ServletContainerSupportStrategy.WebHome]] matching your XWiki version.
4 1. Extract Tomcat to a directory of your choice, referred to as ##TOMCAT_HOME##.
5 1. Give [[enough memory to Java>>doc:documentation.xs.admin.installation.deploy-servlet-container.configure-tomcat.java-memory.WebHome]], since Tomcat's default settings are below [[what XWiki needs>>documentation.xs.admin.installation.xwiki-instance-sizing.WebHome]].
6 1. [[Download the WAR file>>xwiki:Download.WebHome]] for the version you need.
7 1. Extract the XWiki WAR file into a directory named ##xwiki## inside ##TOMCAT_HOME/webapps/##.
8 1. [[Configure a relational database>>doc:documentation.xs.admin.installation.install-relational-database.WebHome]], since XWiki connects to it as soon as Tomcat auto-deploys the ##webapp##.
9 1. Create a directory to store XWiki's [[permanent data>>documentation.xs.admin.installation.directories.permanent-directory.WebHome]], holding attachments, configuration and extensions.
10 1. Open ##TOMCAT_HOME/webapps/xwiki/WEB-INF/xwiki.properties## and set the permanent directory path:(((
11 {{code language="none"}}
12 environment.permanentDirectory=/var/lib/xwiki/data
13 {{/code}}
14 )))
15 1. Configure Tomcat to use ##UTF-8## as the default encoding by adding the following JVM parameter to the Tomcat startup configuration, which the Linux packages of Tomcat generally set already:(((
16 {{code language="none"}}
17 -Dfile.encoding=UTF-8
18 {{/code}}
19 )))
20 1. Start Tomcat using the method corresponding to your installation type:(((
21 * Manual installation:
22 ** Linux/Mac: ##TOMCAT_HOME/bin/startup.sh##
23 ** Windows: ##TOMCAT_HOME\bin\startup.bat##
24 * Service installation, for production environments:
25 ** Linux (systemd): ##systemctl start tomcat##
26 ** Windows Service: ##net start Tomcat##
27 )))
28 1. Open {{code language="none"}}http://localhost:8080/xwiki/bin/view/Main/{{/code}} in a browser. Tomcat deploys XWiki, which serves its Home page.

Get Connected