我在带有 tomcat 7 的 linux(fedora 17)机器上添加了如下用户和角色,但我仍然收到 403 拒绝访问错误。如何解决这个问题?

<role rolename="tomcat"/> 
<role rolename="manager"/> 
<role rolename="admin"/> 
<role rolename="admin-gui"/> 
<role rolename="manager-gui"/>   
<user username="tomcat" password="tomcat" roles="admin_gui,manager_gui"/>  
<user username="admin" password="admin" roles="admin,manager,admin_gui,manager_gui"/>  
<user username="hextek" password="123456" roles="admin,admin_gui,manager,manager_gui"/>   

请您参考如下方法:

检查您在使用定义中使用的角色名称。它们与标准和您定义的不同。
应该是 manager-gui

Note that for Tomcat 6.0.30 onwards, the roles required to use the manager application were changed from the single manager role to add the following four roles. (The manager role is still available but should not be used as it avoids the CSRF protection). You will need to assign the role(s) required for the functionality you wish to access.

manager-gui - allows access to the HTML GUI and the status pages 
manager-script - allows access to the text interface and the status pages 
manager-jmx - allows access to the JMX proxy and the status pages 
manager-status - allows access to the status pages only 


评论关闭
IT干货网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!