=Servlet Container=
In order to deploy BaseX HTTP Services in a servlet container, you can download the WAR distribution of BaseX from the [http://basex.org/download download site], or compile it by youroself via calling <code>mvn compile war:war</code> in the <code>basex-api</code> packagedirectory. The WAR file can then be deployed following the instructions of the corresponding servlet container ([http://www.eclipse.org/jetty/documentation/current/quickstart-deploying-webapps.html jetty], [http://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html tomcat], etc.).
You can configure the port, context path, etc. by following the instructions of the corresponding servlet container. This is needed if you want to replace the default URL path (e.g. http://localhost:8080/rest) with a custom one (e.g. http://localhost:80808984/BaseXbasex/rest).
With If you use Jetty (which is the default HTTP server in of BaseX), you can use a the server configuration is available via the {{Code|jetty.xml}} file for detailed server configuration. You can e.g. enable SSL connections or Jetty logging. Place , which is stored in the {{Code|jetty.xmlWEB-INF}} right directory next to the {{Code|web.xml}}. For detailed configuration refer to the [http://wiki.eclipse.org/Jetty/Reference/jetty.xml Jetty Documentation]. A basic [https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/webapp/WEB-INF/jetty.xml jetty.xml] file is placed in the basex-api package.
To run on [http://tomcat.apache.org/ Apache Tomcat], start the Tomcat server and add any <code>*.war</code> distribution to deploy via the Tomcat web interface. By default, the interface is accessible via http://localhost:8080/manager/html/.