This version of the docs is a work in progress. If you don’t see what you are looking for check the legacy wiki.

This page describes how to run the Repose WAR in a Tomcat container.

Make sure to install the Repose WAR first!

Tomcat Installation

APT Based Linux Distributions

# update package lists from the server
sudo apt-get update

# install Tomcat
sudo apt-get install -y tomcat7

Yum Based Linux Distributions

# update package lists from the server
sudo yum update -y

# install Tomcat
sudo yum install -y tomcat

WAR Deployment

The easiest way to deploy the WAR to Tomcat is to copy it to Tomcat’s deployment directory.

APT Based Linux Distribution

sudo cp /usr/share/repose/ROOT.war /var/lib/tomcat7/webapps
sudo chown tomcat7: /var/lib/tomcat7/webapps/ROOT.war
sudo chown -R tomcat7: /etc/repose /var/log/repose /var/repose

Yum Based Linux Distributions

sudo cp /usr/share/repose/ROOT.war /usr/share/tomcat/webapps
sudo chown tomcat: /usr/share/tomcat/webapps/ROOT.war
sudo chown -R tomcat: /etc/repose /var/log/repose /var/repose




Repose needs two parameters set in order to start with an optional third parameter to set the location of the config directory.

/etc/tomcat7/context.xml (debian), /etc/tomcat/context.xml (RHEL)

    <!-- OPTIONAL: set the location of the config directory -->
    <Parameter name="powerapi-config-directory" value="/etc/repose" override="false"/>

    <!-- REQUIRED: these must match the values in system-model.cfg.xml -->
    <Parameter name="repose-cluster-id" value="repose" override="false"/>
    <Parameter name="repose-node-id" value="repose_node1" override="false"/>

Alternatively, the web.xml file within the war itself can be modified to include the following:



You may want to increase the size of the maximum allowed HTTP header size and number of allowed headers. See Tomcat’s HTTP Connector documentation for more details.

/etc/tomcat7/server.xml (debian), /etc/tomcat/server.xml (RHEL) – PARTIAL FILE
<Connector port="8080"
           maxHeaderCount="2000" />


System Model

Repose can use internal dispatch (within the Tomcat container) to access your deployed WARs.

For example, if you had sample.war deployed, you could set the configured root-path to /sample and then access it as if it was on the root path (e.g., curl localhost:8080 would point to localhost:8080/sample/).

system-model.cfg.xml (partial)
<?xml version="1.0" encoding="UTF-8"?>
<system-model xmlns="">
  <repose-cluster id="repose">
    <endpoint id="internal"


APT Based Linux Distributions

# stop Tomcat
sudo service tomcat7 stop

# remove default site
sudo rm -r /var/lib/tomcat7/webapps/ROOT /usr/share/tomcat7-root/*

# start Tomcat
sudo service tomcat7 start

Yum Based Linux Distributions

# start Tomcat
sudo service tomcat start


You can use curl or HTTPie to send a request to Tomcat.


curl localhost:8080/


http localhost:8080/