In Tomcat 7 you have to add this to tomcat-users.xml (On windows 7 it is located by default installation here: c:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\ )

<<location of Tomcat server>>\Tomcat <<version_no>>\conf\tomcat-users.xml

``````<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
</tomcat-users>``````

NOTE that there shouldn’t be ANY spaces between roles for admin, as this list should be comma separated.

So, instead of this (as suggested in some answers below) – but it is WRONG:

``<user username="admin" password="admin" roles="manager-gui, manager-script, manager-jmx, manager-status, admin-gui, admin-script"/>``

It MUST be like this:

``  <user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>``