以前我都是这样配置manager和admin的:
<?xml version="1.0" encoding="UTF-8"?> <tomcat-users version="1.0" xmlns="http://tomcat.apache.org/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"> <role rolename="manager-gui"/> <role rolename="admin-gui"/> <user password="123456" roles="manager-gui“ username="tomcat"/> <user password="123456" roles="admin-gui" username="tomcat"/> </tomcat-users>
<?xml version="1.0" encoding="UTF-8"?> <tomcat-users version="1.0" xmlns="http://tomcat.apache.org/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"> <role rolename="manager-gui"/> <role rolename="admin-gui"/> <user password="123456" roles="manager-gui,admin-gui“ username="tomcat"/> </tomcat-users>
原文:http://blog.csdn.net/caiwenfeng_for_23/article/details/44241259