tomcat控制台管理员配置
默认进入控制台报:Access to the requested resource has been denied
问题原因:下的是zip版的TOMCAT,用默认的tomcat/tomcat登录就会报此错。所以得手工配置登录用户名
打开TOMCAT/CONF/tomcat-users.xml
默认为:
<?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>
<?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>