Configuring the Tomcat manager webapp

I like to have the Tomcat manager webapp installed on each instance, so I can play with the webapps, and see how many active sessions there are. To do this, make a file called manager.xml file in the webapps directory of your Tomcat instance. One I like to use is this:

    <Context path="/manager"

    <ResourceLink name="users"

    <Valve className="org.apache.catalina.valves.RemoteAddrValve"


The key bit is the docBase attribute, which needs to point to the webapp in the Tomcat installation directory. I add a RemoteAddrValve to keep evil people from trying to break into the manager.

You'll also need to add a user account with permission to use the manager. Put a file called tomcat-users.xml into the conf directory of the Tomcat instance, which should have something like the following:

  <role rolename="manager"/>
  <user username="admin" password="hard2Guess" roles="manager"/>

Finally, your server.xml file needs to have a UserDatabase configured. This is in the example configuration files from the Tomcat installation.

tags for Configuring the Tomcat manager webapp