I'm having problems with the security settings in my java dynamic web app, the problem is when I try to log in I'm keep getting to the login-error.jsp page even when I type the right username and password and never to the logged.html page.
I have written this code in the web.xml file :




and this code in the tomcat-users.xml file that in the " tomcat7/conf/ " dir :

<?xml version='1.0' encoding='utf-8'?>

<role rolename="administrator"/>
<user name="admin" password="admin" roles="administrator" />

Thanks for any suggestion...