将以下代码加入tomcat-users.xml中,即可登录tomcat控制台。
- <role rolename= "manager" />
- <role rolename= "manager-gui" />
- <role rolename= "admin" />
- <role rolename= "admin-gui" />
- <user username= "tomcat" password= "tomcat" roles= "admin-gui,admin,manager-gui,manager" />