How do I set Tomcat Manager Application User Name and Password for NetBeans?
When you're launching tomcat server from netbeans IDE you need to check in menu "tools->servers" on connection tab for tomcat server - there is catalina base directory. And you need to include something like:
<role rolename="manager"/>
<user username="admin" password="admin" roles="manager"/>
at file
\CATALINA_BASE\conf\tomcat-users.xml
or use username automatically generated by IDE with description already placed in this file or on connection tab
For Manager Apps : GUI access:
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
Netbeans Problem: For apache Tomcat server Authentication required dialog box requesting user name and password
This dialog box appear If a user role and his credentials are not set or is incorrect for Tomcat startup via NetBeans IDE,
OR when user/pass set in IDE is not matches with user/pass in "canf/tomcat-user.xml" file
1..Need to check user name and password set in IDE tools-->server
2..Check \CATALINA_BASE\conf\tomcat-users.xml. whether user and his role is defined or not. If not add these lines
<user username="ide" password="EiWnNlBG" roles="manager-script,admin"/>
</tomcat-users>
3.. set the same user/pass in IDE tools->server
- restart your server to get effect of changes
Source: http://ohmjavaclasses.blogspot.com/2011/12/netbeans-problem-for-apache-tomcat.html