5

I get a repeatedly popup to login to Tomcat Manager Application whenever I try running a Java web Project.

Putting in the username/password according to server properties (Manager-script) role doesn't work, the retarded server keeps popping up again with authentication required.

The server is Tomcat 8.0.27 with Netbeans 8.1 Suggestions anyone?

Roman C
  • 49,761
  • 33
  • 66
  • 176
Sumit Dhiman
  • 109
  • 3
  • 8

2 Answers2

4

You should create manager-gui role and grant it to the user in tomcat-users.xml.

<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->

By default Tomcat installs two applications manager and host-manager. These applications are in the webapps and they are using basic authentication mechanism to access their pages. Predefined roles above give access to these administrative apps. More about Manager apps you can find in the docs.

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • 1
    Thanks, was editing the conf file from program files but had to do of Appdata/roaming/etbeans/conf folder.All set now. – Sumit Dhiman Feb 02 '16 at 12:05
  • I had the same problem with a Netbeans 8.2 and adding an external Apache Tomcat 9.0.30. After guaranteeing that the correct user and pass are in the correct tomcat-users.xml and in the netbeans server properties, it still asked me for the credentials. When I cancel the credentials popup, the tomcat starts/stops without problem but the popup keep appearing. Only after I used the credentials in the popup, Netbeans then updated one of its files with the user/pass ([user]\AppData\Roaming\NetBeans\8.2\config\Preferences\org\netbeans\core\authentication.properties) and the popup no longer appeared. – João Ferreira Jan 28 '20 at 16:08
2

You need create a user:

modificate tomcat-users.xml

<?xml version='1.0' encoding='utf-8'?> 
    <tomcat-users> 
    <role rolename="manager-gui"/> 
    <user username="tomcat" password="password" roles="manager-gui" /> 
</tomcat-users> 
PurpleSoft
  • 146
  • 11