【未解决】tomcat配置basic验证总是不通过
是不是这么配置哦,配置出来输3遍密码就直接甩个401过来(帐号abc,密码12345),求大神指正错误
/conf/tomcat-users.xml
1 <tomcat-users> 2 <role rolename="admin"/> 3 <user username="abc" password="12345" roles="admin"/> 4 </tomcat-users>
/WEB-INF/web.xml
1 <security-constraint> 2 <web-resource-collection> 3 <web-resource-name>RegisteredUsers</web-resource-name> 4 <url-pattern>/*</url-pattern> 5 </web-resource-collection> 6 <auth-constraint> 7 <role-name>admin</role-name> 8 </auth-constraint> 9 </security-constraint> 10 11 <login-config> 12 <auth-method>BASIC</auth-method> 13 <realm-name>Registered Users</realm-name> 14 </login-config> 15 16 <security-role> 17 <role-name>admin</role-name> 18 </security-role>