When you change the Tomcat-users.xml file, do not delete the content, but add it on its basis.
This I have tried many times, is possible, open different Tomcat can enter the manager app interface
My tomcat-users.xml file is as follows:
Tomcat-users.xml File Contents
<?xml version= "1.0" encoding= "UTF-8"?>
<!--
Licensed to the Apache software Foundation (ASF) under one or more
Contributor license agreements. See the NOTICE file distributed with
This is for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); Except in compliance with
The License. Obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to writing, software
Distributed under the License is distributed on a "as is" BASIS,
Without warranties or CONDITIONS of any KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-
<tomcat-users xmlns= "Http://tomcat.apache.org/xml"
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation= "Http://tomcat.apache.org/xml tomcat-users.xsd"
Version= "1.0" >
<!--
Note:by default, no user is included in the "Manager-gui" role required
To operate the "/manager/html" Web application. If you wish the use of this app,
You must define such a user-the username and password is arbitrary. It is
Strongly recommended that's don't use one of the users in the commented out
section below since they is intended for use with the examples web
Application.
-
<!--
Note:the sample user and role entries below is intended for use with the
Examples Web application. They is wrapped in a comment and thus is ignored
When reading the this file. If you wish to configure these users
Examples Web application, don't forget to remove the <!.. .. > that surrounds
them. You'll also need to set the passwords to something appropriate.
-
<!--
<role rolename= "Tomcat"/>
<role rolename= "Role1"/>
<user username= "Tomcat" password= "<must-be-changed>" roles= "Tomcat"/>
<user username= "Both" password= "<must-be-changed>" roles= "Tomcat,role1"/>
<user username= "Role1" password= "<must-be-changed>" roles= "Role1"/>
-
<role rolename= "Manager-gui"/>
<user username= "Manager" password= "manager" roles= "Manager-gui"/>
</tomcat-users>
Fix tomcat9.0 go to Manager app page