Jetty Installation
Version 11.1 by Vincent Massol on 2021/02/15
There are several ways to run XWiki on Jetty:
- Using the Demo packaging (a.k.a Standalone packaging) which bundles Jetty and provide an all-in-one zip, ready to use.
- Using the official Jetty docker image.
- Downloading and instaling Jetty manually on your server.
If you go with the last 2 options, make sure you pick a supported version of Jetty.
Docker
- Extract the XWiki WAR into a directory named xwiki. Let's call this directory [XWIKI_HOME].
- Run the Jetty Docker image, for example: docker run -v [XWIKI_HOME]:/var/lib/jetty/webapps/xwiki -p 8080:8080 jetty:9-jre11
Manual
- Download and install Jetty. It's usually as simple as unzipping it in a directory. Let's call this directory [JETTY_HOME].
- Extract the XWiki WAR into a directory named xwiki in [JETTY_HOME]/webapps/.
- Open [JETTY_HOME]/webapps/xwiki/WEB-INF/xwiki.properties files and configure a permanent directory
- (Optional) If you want to modify the port on which Jetty will run, edit [JETTY_HOME]/start.ini. Search for 8080, replace it with the port value you wish to use and uncomment the corresponding property jetty.http.port.
Troubleshooting
Unable to parse form content
In some cases you could obtain one of the following error messages:
- org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form content
This can be related to a form containing too many parameters. In order to fix this issue, you can modify your jetty.xml file as explained in Configuring form limits for the server.