你修改的是哪个文件?
如果是tomcat-users.xml文件请将这个文件还原回去!
注释掉
<tomcat-users>
<!--
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.
-->
<!--
NOTE: The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
-->
<!--
<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"/>
-->
</tomcat-users>
我修改的是conf的tomcat-user文件
@莫名的忧伤: 难道不是修改 文件?还有那其他的解决方法吗
@莫名的忧伤:
突然忘记tomcat登录密码,进不去站点?
我上面给出你的是让你注销掉Tomcat的用户+密码,变成默认的状态!
如果你非要加入<role rolename="tomcat"/> 从名字可以看出这个是角色,
<user username="tomcat" password="tomcat" roles="tomcat"/>就是用户+密码+角色
该用户有几个角色配置在roles属性就ok
@Beyond-bit: 有没有人帮我解决这个问题啊,好着急