Hi everyone:
I have a webapp directory webblank and I want to add a BASIC check on it.
So I add the code :
<security-constraint>
<web-resource-collection>
<web-resource-name>RegisteredUsers</web-resource-name>
<url-pattern>/webblank/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>role1</role-name>
<role-name>standard</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Registed user</realm-name>
</login-config>
<security-role>
<role-name>role1</role-name>
</security-role>
in the web.xml.
And I also change the webblank "privileged" to "true" in server.xml.
Add the <realm ....> the the server.xml.
But it can't work.
When I change the url-pattern to <url-pattern>/*</url-pattern> it works property and When I input
http://localhost:8080/webblank it check me using BASIC.
Why it can't work to my own webapp?
Thks :roll: