a. 在tomcat-user.xml文件的最下方找到角色和用户的配置。
<!--<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"/>
-->
b. 将以上代码注释打开,更改为 <role rolename ="manager-gui"/><role rolename ="manager-script"/><user username="you user name" password="you password" roles ="manager-gui,manager-script"/>
c.各个角色说明
manager-gui — Access to the HTML interface.
manager-status — Access to the "Server Status" page only.
manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
manager-jmx — Access to JMX proxy interface and to the "Server Status" page.