什么是Tomcat的基本身份验证的用户名/密码? [英] what's username/password of tomcat basic authentication?
本文介绍了什么是Tomcat的基本身份验证的用户名/密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经挖了有关如何设置tomcat的认证,是的,它确实有一个弹出窗口,这让我输入用户名/密码的引导互联网,但似乎我的用户名/密码错误。
我加分我的tomcat-user.xml这里:
I've digged the internet for the guide about how to set tomcat authentication,and yes,it really has a pop-up window,which allows me to input username/password,but it seems that my username/password is wrong. I add fraction of my tomcat-user.xml here:
enter code here
<!--
<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"/>
-->
和这里的web.xml的部分:
and fraction of web.xml here:
enter code here
<auth-constraint>
<role-name>tomcat</role-name>
<role-name>both</role-name>
<role-name>role1</role-name>
</auth-constraint>
所有这些雄猫/ tomcat的,既有/ tomcat的,基于role1 /雄猫不起作用。
有什么问题?
All these "tomcat/tomcat,both/tomcat,role1/tomcat" don't work. What's problem?
推荐答案
路军
更新后的文件应该是这样的。
The file after update should look like this
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<!--
<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"/>
-->
<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="admin" roles="admin,manager"/>
</tomcat-users>
重新启动Tomcat和使用管理/管理员
Restart tomcat and use admin/admin
这篇关于什么是Tomcat的基本身份验证的用户名/密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文