How to enable tomcat manager in tomcat

Tomcat manager is used to manage tomcat from where you can deploy the applications in tomcat. It also provides you list of the applications and provide complete status of the server. By default when we install tomcat tomcat manager is not enabled on the server by default.  To enable tomcat manager role you will need to mention a user in the file tomcat-users.xml and will need to assign tomcat manager role to it so it can access the tomcat manager.

  1. You will need to locate the file tomcat-users.xml
  2. Go to bottom of that file and enter below code at the bottom before </tomcat-users>
    <role rolename="admin"/>
    <role rolename="admin-gui"/>
    <role rolename="manager-gui"/>
    <user username="tomcatadmin" password="tomcat2009" roles="admin,admin-gui,manager-gui"/>

    3.  Ensure that code is within <tomcat-users>  and </tomcat-users>

Leave a Comment