tomcat默认是将用户是注释的
配置文件在根目录下/conf/tomcat-users.xml文件中
配置默认如下:
<!--
<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"/>
-->
将注释去掉,并将角色修改为manager
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="manager"/>
重启tomcat就ok了