I\'m trying to follow a tutorial to make an extremely basic Java web application in NetBeans.
When I try to run it, a dialogue box appears title \"Authentication Req
Go to apache-tomcat\conf folder add these lines in
tomcat-users.xml file
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>
and restart server
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
Source: http://ohmjavaclasses.blogspot.com/2011/12/netbeans-problem-for-apache-tomcat.html
File \conf\tomcat-users.xml
, before this line
</tomcat-users>
add these lines
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
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"/>
Follow my steps and be happy:
1.- When you are configuring Netbeans for the first time, they will ask you for a "user" and "pass" for the Catalina-Server.
2.- Type whatever "user" and "pass" . This will modify your "tomcat-users.xml" and will add:
user password="MYPASS" roles="manager-script,admin,tomcat" username="MYUSER"
3.- To use this "user" just restart your TOMCAT WEB SERVER and NETBEANS.