授予管理员角色的用户无法访问tomcat管理器页面。
我在tomcat-users.xml中添加了一个具有管理员角色的用户:
<role rolename="manager"/>
<user username="emanemos" password="password" roles="manager"/>
我还查找了$ CATALINA_HOME / webapps / manager / WEB-INF / web.xml,以确保管理员角色真正用于访问应用程序:
<auth-constraint>
<!-- NOTE: This role is not present in the default users file -->
<role-name>manager</role-name>
</auth-constraint>
<!-- Define the Login Configuration for this Application -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Tomcat Manager Application</realm-name>
</login-config>
<!-- Security roles referenced by this web application -->
<security-role>
<description>
The role that is required to log in to the Manager Application
</description>
<role-name>manager</role-name>
</security-role>
但是,管理器应用程序仍在无限循环中请求登录密码对,而忽略了我的输入。
有人有什么想法吗?
答案 0 :(得分:0)
在对tomcat-users.xml进行更改后是否重启了Tomcat?