通过tomcat-user.xml配置tomcat中 manager app的用户名和密码

tomcat中 manager app 中的用户名密码是配置在conf/tomcat-user.xml中的,开始配置了半天没反应,后来才发现代码都是注释掉的。改了也无效。后来把注释去掉,还是无效,最后在用下边的组合才有效。
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user password="tomcat" roles="tomcat,manager-gui,admin-gui" username="tomcat"/>
<user password="tomcat" roles="tomcat,role1" username="both"/>
<user password="tomcat" roles="role1" username="role1"/>


猜你喜欢

转载自blog.csdn.net/liufangbaishi2014/article/details/76873720