Well, you need to look at the answers above, but you'll find that the manager app requires you to have a user with the role 'manager', I believe, so you'll probably want to add the following to your tomcat-users.xml file:
My answer is tested on Windows 7 with installation of NetBeans IDE 6.9.1 which has bundled Tomcat version 6.0.26. The instruction may work with other tomcat versions according to my opinion.
If you are starting the Apache Tomcat server from the Servers panel in NetBeans IDE then you shall know that the Catalina base and config files used by NetBeans IDE to start the Tomcat server are kept at a different location.
Steps to know the catalina base directory for your installation:
Right click on the Apache Tomcat node in Servers panel and choose properties option in the context menu. This will open a dialog box named Servers.
Check the directory name of the field Catalina Base, this is that directory where the current conf/tomcat-users.xml is located and which you want to open and read. (In my case it is C:\Users\Tushar Joshi\.netbeans\6.9\apache-tomcat-6.0.26_base )
Open this directory in My Computer and go to the conf directory where you will find the actual tomcat-users.xml file used by NetBeans IDE. NetBeans IDE comes configured with one default password with username="ide" and some random password, you may change this username and password if you want or use it for your login also
This dialog box also have username and password field which are populated with these default username and password and NetBeans IDE also offers you to open the manager application by right clicking on the manager node under the Apache Tomcat node in Servers panel
The only problem with the NetBeans IDE is it tries to open the URL http://localhost:8084/manager/ which shall be http://localhost:8084/manager/html now
If people still have problems after adding/modifying the tomcat-users.xml file and adding the relevant user/role for the version of Tomcat that they're using then please be sure that you've removed the comment tags that are surrounding this block. They will look like this in the XML file: <!-- -->
They will be above and below the user/role section.
If your apache tomcat asking for password,then just follow these steps:
go to the home directory of apache
then go to webapps folder
open the META-INF
inside that you will find an xml file named context.xml--open it in edit mode
and REMOVE THE COMMENT FROM the VALVE tag.
After that you dont need any user name and password.
So you can modify the tomcat_user.xml under CATALINA_HOME: until your face turns blue, to no effect.
It appears that the IDE only requires, manager-script,admin roles under CATALINA_BASE:.
When I tried to add a user to the manager-gui role (to the correct tomcat_user.xml file), required for access to the Tomcat Manager, Tomcat stopped presenting the login dialog and went directly to the 401 access denied splash page.
It appears that the NetBeans package uses a locked-down version of TomCat.
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\ )
For Window 7, Netbeans 8.0.2 , Apache Tomcat 8.0.15
C:\Users\JONATHAN\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\tomcat-users.xml
The Tomcat Manager Username and password is like below pic..
In Tomcat 7, 8, and 9 there is NO default user, so nobody can access a Manager app. You need to alter conf/tomcat-users.xml by adding new user with the role "manager-gui", like: