tomcat无法进入Manager管理App项目

一、

找到你下载的tomcat,进入conf中。找到tomcat-users.xml文件用记事本(建议用NotePad++有颜色高亮显示)。

找到文件的最后,可以看到

<!-- <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"/> -->

可以看到在最下面可以看到tomcat默认把用户注释掉了,也就是说打开tomcat主页是进不去管理页面的。

把注释自接删除,直接把下面代码复制。

     <role rolename="tomcat"/>
    <role rolename="role1"/>
    <role rolename="manager-gui" />
    <user username="tomcat" password="tomcat" roles="tomcat"/>
    <user username="both" password="tomcat" roles="tomcat,role1"/>
    <user username="role1" password="tomcat" roles="role1"/>
    <user username="你自己的用户名" password="你自己的密码" roles="manager-gui" />

猜你喜欢

转载自blog.csdn.net/qq_40794973/article/details/83688645