Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

username and password are not getting verified by tomcat

 
saima kanwal
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove the comments (<!-- -->) from tomcat-users.xml
 
saima kanwal
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic