wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes username and password are not getting verified by tomcat 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 » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "username and password are not getting verified by tomcat" Watch "username and password are not getting verified by tomcat" New topic
Author

username and password are not getting verified by tomcat

saima kanwal
Ranch Hand

Joined: Oct 05, 2009
Posts: 148
While learning security chapter from HFSJ, i modified a webapp of my own that uses a servlet to give medical advice.
I put the security lock on the servlet, so that when the servlet is invoked , it prompts for username and password. My web.xml is :



the tomcat-users.xml has the following usernames and passwords:


I have tried each and every username /password pair but it again shows the authentication pop up box without accepting it. Note that my web app without these security settings is working well. It is not authenticating the usernames. can anyone help me out , why ?? what's the mistake?

SCJP 6.0 (86%) SCWCD 5 (94%)
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Remove the comments (<!-- -->) from tomcat-users.xml


[My Blog]
All roads lead to JavaRanch
saima kanwal
Ranch Hand

Joined: Oct 05, 2009
Posts: 148
Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: username and password are not getting verified by tomcat
 
Similar Threads
HTTP Status 403 Access to the requested resource has been denied
Authentication and Authorization implementation using DD Problem
Can't get past BASIC authentication
web security not working as expected,
Problem with enforcing security in web-app