IntelliJ Java IDE
The moose likes Tomcat and the fly likes Tomcat  BASIC check can't work property Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Tomcat  BASIC check can Watch "Tomcat  BASIC check can New topic
Author

Tomcat BASIC check can't work property

lyo Yashnoo
Ranch Hand

Joined: Sep 15, 2003
Posts: 50
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:
 
 
subject: Tomcat BASIC check can't work property
 
Threads others viewed
Problem While Enabling Authentication
BASIC authentication not working
Basic Authentication using web.xml
Unable to apply security
password authentication causes 403 error
IntelliJ Java IDE