Tomcat's role configuration--tomcat background management

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.