简体   繁体   English

Tomcat Manager身份验证在运行Java Web项目时重复弹出

[英]Tomcat Manager Authentication repeated popup while running a Java web project

I get a repeatedly popup to login to Tomcat Manager Application whenever I try running a Java web Project. 每当我尝试运行Java Web项目时,我都会反复弹出以登录Tomcat Manager Application。

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. 根据服务器属性(Manager-script)角色输入用户名/密码不起作用,延迟服务器会再次弹出需要的身份验证。

The server is Tomcat 8.0.27 with Netbeans 8.1 Suggestions anyone? 服务器是Tomcat 8.0.27,Netbeans 8.1建议有人吗?

You should create manager-gui role and grant it to the user in tomcat-users.xml . 您应该创建manager-gui角色并将其授权给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 . 默认情况下,Tomcat会安装两个应用程序managerhost-manager These applications are in the webapps and they are using basic authentication mechanism to access their pages. 这些应用程序位于webapps应用程序中,它们使用基本身份验证机制来访问其页面。 Predefined roles above give access to these administrative apps. 上面的预定义角色可以访问这些管理应用程序。 More about Manager apps you can find in the docs. 有关您可以在文档中找到的Manager应用程序的更多信息。

You need create a user: 您需要创建一个用户:

modificate tomcat-users.xml 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> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将war文件部署到webapps后,Java项目未在tomcat管理器的tomcat服务器上运行? - Java project is not running on tomcat server from tomcat manager after deploying war file to webapps? 使用Tomcat服务器在Eclipse中运行Java Web应用程序时系统重新启动 - system restarts while running a java web application in eclipse with tomcat server 运行 Jersey 项目(休息 web 服务)到 tomcat - Running Jersey project (Rest web service) to tomcat 使用tomcat在eclipse外部运行Web项目 - running a web project outside eclipse using tomcat 使用tomcat 7运行Web服务时是否为ClassNotFoundException? - ClassNotFoundException while running web service with tomcat 7? 在Eclipse项目中的Eclipse上运行Java EE Web服务器“ Servlet”的Eclipse中,尝试部署无关的目录 - In Eclipse running a Java EE Web Server “Servlet” on Tomcat project attempts to deploy extraneous directories 在没有战争的情况下在tomcat上运行Java Web应用程序 - Running Java web application on tomcat without war Tomcat Java Web应用程序运行缓慢 - Tomcat java web application got running slowly 在tomcat下运行的Java Web应用程序挂起 - Java web app running under tomcat hangs 在 Tomcat9 上运行时,在 Maven/Jersey web 服务上获取 java.lang.ClassNotFoundException: jakarta.servlet.Filter - Getting java.lang.ClassNotFoundException: jakarta.servlet.Filter on Maven/Jersey web service while running on Tomcat 9
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM