当我尝试访问以下URL时,我不断收到提示输入用户名和密码:
http://localhost:8080/manager/html
App Server:Tomcat 6.0.35
浏览器:Firefox 3.6.18
操作系统:Centos 5.5
tomcat-users.xml的内容:
<tomcat-users> <role rolename="manager"/> <user username="tomcat" password="tomcat" roles="manager"/> </tomcat-users>
我用:sudo ./startup.sh启动了Tomcat
我用:sudo ./shutdown.sh阻止了Tomcat
解决方法
Apache Tomcat 6的角色已根据以下文档的链接进行了更改.
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Configuring_Manager_Application_Access
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Configuring_Manager_Application_Access
管理器应用程序定义了四个角色:
manager-gui - Allows access to the html interface manager-script - Allows access to the plain text interface manager-jmx - Allows access to the JMX proxy interface manager-status - Allows access to the read-only status pages
对于你的问题,试试这个:
<role rolename="manager"/> <role rolename="manager-gui"/> <role rolename="admin"/> <user username="user" password="password" roles="admin,manager,manager-gui"/>
它100%工作.