Configure WebSphere
Last modified by Eleni Cojocariu on 2026/08/25 10:00
Steps
To deploy XWiki on WebSphere Liberty as your servlet container:
- Install WebSphere Liberty and a supported Java runtime. The Liberty installation directory is referred to as WLP_HOME.
- Create a Liberty server, whose configuration directory WLP_HOME/usr/servers/xwiki is referred to as SERVER_CONFIG:
WLP_HOME/bin/server create xwiki - Enable a Jakarta Servlet feature of version 5.0 or later in SERVER_CONFIG/server.xml, since the XWiki web application is built against the jakarta namespace:
<featureManager> <feature>servlet-6.0</feature> </featureManager> - Download the XWiki WAR file for the version you need.
- Extract the XWiki WAR file into a directory named xwiki.war inside SERVER_CONFIG/apps/, and declare it in SERVER_CONFIG/server.xml with /xwiki as its context root, which XWiki's URLs rely on:
<webApplication id="xwiki" location="xwiki.war" contextRoot="/xwiki"/> - Configure a relational database, which XWiki connects to as soon as Liberty deploys it.
- Create a directory to store XWiki's permanent data.
- Open SERVER_CONFIG/apps/xwiki.war/WEB-INF/xwiki.properties and set the permanent directory path:
environment.permanentDirectory=/var/lib/xwiki/data - Give Java the memory, the encoding and the module access that XWiki needs, by creating SERVER_CONFIG/jvm.options:
-Xmx1024m -Dfile.encoding=UTF-8 --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED - Start the server:
WLP_HOME/bin/server start xwiki - Open
http://localhost:9080/xwiki/bin/view/Main/in a browser. Liberty deploys XWiki, which serves its Home page.
FAQ
Can I use traditional WebSphere Application Server instead of Liberty?
No. XWiki requires Jakarta Servlet 5.0 or later, while traditional WebSphere Application Server implements Java EE 8, whose servlet API is still in the javax namespace.
How do I change the port 9080?
Edit the httpEndpoint element of SERVER_CONFIG/server.xml and set its httpPort attribute to the port you want to use.
Why do some attachments download instead of being displayed?
XWiki's WEB-INF/web.xml declares a MIME type for only a few extensions and leaves the rest to the container, which serves an extension it does not know as application/octet-stream. Declare the missing MIME type in WebSphere, or add a mime-mapping entry to that file.
Can WebSphere manage the database connections?
Yes, by declaring a data source in server.xml and pointing XWiki at it, as described in Use a Container-Managed Data Source.