check whether the role code is commented by -->, if yes, remove it. I was doing very thing correct but the login was not successful, then I found that the code is commented, after removing it the login is working fine.
I added two lines:
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
My tomcat is 7
Thanks