Issue
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 Required". Inside the dialogue box there the heading "Tomcat Manager Application" and fields for "User Name" and "Password."
Investigating this, I've come to understand that I should edit the file
\TOMCAT_HOME\conf\tomcat-users.xml
to include something like:
<user username="user" password="password" roles="standard,manager"/>
so I've done that, but it hasn't helped yet.
Can anyone provide some insight? I'm using Tomcat 6.0.20, NetBeans 6.7.1, and Windows Vista. I'm using jdk1.7.0, but Java hasn't really entered into this project yet.
Solution
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"/>
Answered By - user162663
Answer Checked By - Senaida (JavaFixing Volunteer)