tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oki DZ <>
Subject Re: JDBC Realm is gone
Date Tue, 15 May 2001 07:44:02 GMT

I can get the MD5 authentication working.
In my server.xml:
	<Context path="/test" docBase="test" debug="9"
	     <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
	       userTable="Users" userNameCol="username" userCredCol="password"
	       userRoleTable="userroles" roleNameCol="rolename" />

I guess, it's the meaning of "attaching a realm to a context"; ie:
inserting the realm element in the context element.

My webapp's web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

              <!--  ^^^^ this could be arbitrary it seems. Tomcat
doesn't use it;
                    ie: the servlets don't have hard-wired "internal
roles" -->
               <!-- ^^^^^^ this "link", links to the role-name in the
auth-constraint below -->

      <web-resource-name>Entire Application</web-resource-name>

  <!-- Define the Login Configuration for this Application -->

           <!--  ^^^^^ this has to be BASIC (no "DIGEST," to be exact
                 meaning: using the browser login box -->
    <realm-name>Test Application</realm-name>

BTW, if I don't want to use any role for the authentication, how should
I proceed? I mean, username-password pairs in the users' database should
be sufficient. (With the roles set up, I have to maintain another table;
ie: userroles.)

BTW2, useful references:
* Tomcat docs in the source directories.


View raw message