问题原因:下的是zip版的TOMCAT,用默认的tomcat/tomcat登录就会报此错。所以得手工配置登录用户名
打开TOMCAT/CONF/tomcat-users.xml
默认为:
修改后:
所以再用 admin/admin登录即可。
打开TOMCAT/CONF/tomcat-users.xml
默认为:
Java代码 <a href="http://orz.javaeye.com/blog/100461#" copytoclipboard',this);return="" false;"="" title="复制代码" style="color: rgb(16, 138, 198);">
- <?xml version='1.0' encoding='utf-8'?>
- <tomcat-users>
- <role rolename="tomcat"/>
- <role rolename="role1"/>
- <user username="both" password="tomcat" roles="tomcat,role1"/>
- <user username="role1" password="tomcat" roles="role1"/>
- <user username="admin" password="admin" roles="admin,manager"/>
- </tomcat-users>
修改后:
Java代码 <a href="http://orz.javaeye.com/blog/100461#" copytoclipboard',this);return="" false;"="" title="复制代码" style="color: rgb(16, 138, 198);">
- <?xml version='1.0' encoding='utf-8'?>
- <tomcat-users>
- <role rolename="tomcat"/>
- <role rolename="role1"/>
- <role rolename="manager"/>
- <role rolename="admin"/>
- <user username="tomcat" password="tomcat" roles="tomcat"/>
- <user username="both" password="tomcat" roles="tomcat,role1"/>
- <user username="role1" password="tomcat" roles="role1"/>
- <user username="admin" password="admin" roles="admin,manager"/>
- </tomcat-users>
所以再用 admin/admin登录即可。