wood burning stoves 2.0*
The moose likes Security and the fly likes Basic Authentication Does Not Work Properly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Basic Authentication Does Not Work Properly" Watch "Basic Authentication Does Not Work Properly" New topic

Basic Authentication Does Not Work Properly

Kashinath Roy

Joined: Apr 21, 2009
Posts: 9

Inordere to implement BASIC authentication having following configurationPutting this in tomcat user.xml

<role rolename="Admin"/>
<role rolename="Member"/>
<role rolename="Guest"/>

<user username="admin1" password="admin1" roles="Admin,Member,Guest"/>
<user username="knroy" password="knroy" roles="Member"/>
<user username="guest1" password="guest1" roles="Guest"/>

putting this in myproject1--->web.xml



and restart tomcat 6 ----->run Project---> asking login prompt---->username: admin1 password:admin1--->HTTP 401 error
[ Under Windows XP with running in localhost:8080 ]

Why it is not working despite follwing all the steps as mentioned above
Arshad Noor
Ranch Hand

Joined: Oct 06, 2011
Posts: 34
Anytime you have a client-server application that gives you problems, supplying just the client-side error message rarely helps you get an answer. Have you looked at the server's log to see what error is reported? If you cannot make out what the error means, post the server-side error message on the forum; you might get a solution or a pointer to the solution.

Arshad Noor
StrongAuth, Inc.
Kashinath Roy

Joined: Apr 21, 2009
Posts: 9
Please find error message

HTTP Status 401 -


type Status report


description This request requires HTTP authentication ().


Apache Tomcat/6.0.35

It is sorta covered in the JavaRanch Style Guide.
subject: Basic Authentication Does Not Work Properly
Similar Threads
Problem While Enabling Authentication
The DD security-role element in web.xml
web apps security
Problem with security constraints while doing authentication & authorization
web security not working as expected,