Tomcat之配置tomcat-users.xml文件

<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
上面这一段注释告诉我们,为了安全起见,Tomcat默认没有"manager-gui",需要我们自己加。
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager-gui"/>
  <role rolename="admin-gui"/>
  <user username="tomcat" password="tomcat" roles="tomcat,manager-gui,admin-gui"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>

你可能感兴趣的:(Tomcat之配置tomcat-users.xml文件)