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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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.
 
jQuery in Action, 2nd edition
 
subject: username and password are not getting verified by tomcat