In the Tomcat5.5 version, if the user role is not configured, the Administration page is [Url]http://localhost:port/manager/html[/url] and [url]http:// Localhost:8080/admin[/url] will not be able to log in because of a user name and password error. Although we see the correct username and password in the Tomcat-users.xml file in the Tomcat installation directory, we still cannot log in. The reason is the configuration of the user role.
OriginalThe contents of the Tomcat-users.xml file are as follows:<?xml version= ' 1.0 ' encoding= ' utf-8 '?>
<Tomcat-users>
<role rolename= "Tomcat"/>
<role rolename= "Role1"/>
<user username= "Tomcat" password= "Tomcat"roles= "Tomcat"/>
<user username= "Both" password= "Tomcat" roles= "Tomcat,role1"/>
<user username= "Role1" password= "Tomcat" roles= "Role1"/>
</tomcat-users> ?Tomcat administrators and Power users need to add two roles with the following changed file contents:<?xml version= ' 1.0 ' encoding= ' utf-8 '?>
<Tomcat-users>
<role rolename= "Tomcat"/>
<role rolename= "Role1"/>
<role rolename= "Manager"/>
<role rolename= "admin"/>
<user username= "Tomcat" password= "Tomcat" roles= "tomcat,manager,admin"/>
<user username= "Both" password= "Tomcat" roles= "Tomcat,role1"/>
<user username= "Role1" password= "Tomcat" roles= "Role1"/>
</tomcat-users>
The manager and admin are the newly added two roles, and then the following user names are correctly associated. Then we can actually get in.Tomcat's backstage was managed by!~reference configuration: Tomcat-users.xml===================== start ========================
<role rolename= "Tomcat"/>
<role rolename= "Role1"/>
<role rolename= "Manager"/>
<role rolename= "admin"/>
<role rolename= "Admin-gui"/>
<role rolename= "Admin-script"/>
<role rolename= "Manager-gui"/>
<role rolename= "Manager-script"/>
<role rolename= "Manager-jmx"/>
<role rolename= "Manager-status"/>
<user username= "admin" password= "123456" roles= "Admin,manager,role1,tomcat,admin-gui,admin-script,manager-gui, Manager-script,manager-jmx,manager-status "/>
===================== End =======================
Tomcat's role configuration--tomcat background management