Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Not Get Tomcat's Basic Authentication to Work

Status
Not open for further replies.

krmathieu

IS-IT--Management
Nov 10, 2006
1
US
I can not get BASIC authentication to work with a webapp that I deployed on Tomcat, even though I have the following entries in the web.xml file in the apps WEB-INF directory. Does anybody see what I am doing wrong? When I go the the WebSiteDev directory, I am expecting to get prompted for a user name and password, but all of the pages still come up without any request for authentication. Plus I don't get any errors when I start Tomcat (I,a using vesion .5.5), so I don't think the xml is bad. Any help that anybody could provide would be greatly appreciated. Thanks!

Kevin

<security-constraint>
<web-resource-collection>
<web-resource-name>Sample Website</web-resource-name>
<url-pattern>/WebSiteDev/*</url-pattern>
</web-resource-collection>

<auth-constraints>
<role-name>admin</role-name>
</auth-constraints>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Sample Website</realm-name>
</login-config>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top