I have the following in my web.xml
<security-constraint>
<web-resource-collection>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>rolename</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<security-role>
<role-name>rolename</role-name>
</security-role>
And also have the following in my tomcat-users.xml file:
<role rolename="rolename"/>
<user username="username" password="password" roles="rolename"/>
The Authentication Required dialogue box appears when I try to navigate to my localhost site, but even though I enter the correct credentials, the dialogue box just refreshes itself and nothing happens.
Any reason why this isn't working? Doesn't seem as basic as the auth-method suggests.