NbWebAppDeploy
Resolving NetBeans web app deployment problem (to Apache Tomcat)
If you get the following error in NetBeans when you try to deploy your web app to Apache Tomcat:
Access to Tomcat server has not been authorized. Set the correct username and password with the "manager" role in the Tomcat customizer in the Server Manager.
Try configuring the "tomcat-users.xml" file so the "manager" role is present - file should be in "%CATALINA_HOME%\conf" (don't forget to change the username and password!):
<tomcat-users> <role rolename="manager"/> <role rolename="standard"/> <user username="mgr_usr" password="you_password_here" roles="standard,manager"/> </tomcat-users>
Then configure NetBeans to use the same credentials (Tools > Servers):
}}center
NetBeans Servers configuration dialogue
}}
Then restart NetBeans and Tomcat - you should be good to go now!
It looks like the problem occurs if you install Tomcat separately from NetBeans.
Below is the article where I got the above from:
http://wiki.netbeans.info/wiki/view/AddExternalTomcat
-- By Kok-Yan Lo - Original blog entry

