ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Using Tomcat 4 Security Realms
Subject:   Error when entering username and password
Date:   2003-03-26 13:09:53
From:   anonymous2
Good article, but as a complete novis on the subject I need some help.

I have a MSAccess Database with a User, Role and User_Role table as the article said. I get the login dialog to pop up but when I enter a username and password (that of course are in the User table and are mapped to the role in the User_Role table) nothing happens. After 3 tries I get an error page saying "This request requires HTTP authentication ()". What is wrong?

Here is what I enterd in server.xml and web.xml:

<realm classname="org.apache.catalina.realm.JDBCRealm" debug="99"
connectionurl="jdbc:odbc://localhost/SWE11" connectionname=""
usertable="User" usernamecol="UserName" usercredcol="Password"
userroletable="User_Role" rolenamecol="RoleName"/>

<web-resource-name>MyApp Online</web-resource-name>
<realm-name>MyApp Online</realm-name>