一尘不染

Tomcat 7 Manager无法登录

tomcat

尝试登录但无法登录。我的tomcat-users.xml,按照我在这里看到的进行了修改。

    <?xml version="1.0" encoding="UTF-8"?>
   <tomcat-users>
      <role rolename="manager-gui"/>
      <role rolename="manager-script"/>
      <role rolename="manager-jmx"/>
      <role rolename="manager-status"/>
      <role rolename="admin-gui"/>
      <role rolename="admin-script"/>
      <user username="admin" password="admin" roles="manager-gui, manager-script, manager-jmx, manager-status, admin-gui, admin-script"/>
    </tomcat-users>

有什么建议么?


阅读 281

收藏
2020-06-16

共1个答案

一尘不染

删除admin / admin角色之间的空格。该列表应以逗号分隔,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <role rolename="admin-gui"/>
  <role rolename="admin-script"/>
  <user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
</tomcat-users>
2020-06-16