Tomcat Manager Authentication repeated popup while running a Java web project

北城余情 提交于 2021-02-19 02:05:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!