问题
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?
回答1:
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.
回答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>
来源:https://stackoverflow.com/questions/35152486/tomcat-manager-authentication-repeated-popup-while-running-a-java-web-project