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"/>
-->
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>
All these "tomcat/tomcat,both/tomcat,role1/tomcat" don't work. What's problem?