tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland" <>
Date Tue, 28 Aug 2001 22:31:51 GMT
Ok, now I will give all details of my problem, you asked for it! :)
First of all I`m using Tomcat 4.0-b5(beta 5)

Now for the information available on the WEB:
First of all its confusing and contradictory. There doesn`t seem to be
information on using JDBC realms for TOMCAT 4.X, so the information I found
is for Tomcat 3.2.X(look at
Go to that page and to the link named "JDBC realms" in the TOMCAT 3.2.X

He will tell you to create the tables in a MySql database. Thats fine, since
we run MySql here, so there was no problem setting up the tables.
The next step is setting up the server.xml file in the  tomcat_home/conf
Here the contradictions start.
In the Tomcat 3.2.X docs in they have the
following format:

    <RequestInterceptor className="org.apache.tomcat.request.JDBCRealm"

     userTable="users" userNameCol="user_name" userCredCol="user_pass"
     userRoleTable="user_roles" roleNameCol="role_name" />

Now if you go to the other tutorial about JDBC realms that I have read at
they use an <realm> element instead of the <RequestInterceptor> element:

<realm classname="org.apache.catalina.realm.JDBCRealm" debug="99"

    usertable="users" usernamecol="user_name" usercredcol="user_pass"
    userroletable="user_roles" rolenamecol="role_name"/>

So what kind of Element should I use?

The next question is that unlike the Memory Realm, there seems to be no need
to configure the web.xml file. This looks like nonsense for me. Both
tutorials above dont say anything about the web.xml file. But in the onjava
tutorial, when talking about the memory realm he says that you must have the
following stuff in your web.xml file:

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

    <realm-name>OnJava Application</realm-name>

So I think that I also need this kind of information in my web.xml file,
even if I`m using JDBC realms instead of memory realms, or do I see
something wrong here?
That makes me wonder how the guys using JDBC realms arent experiencing any
problems and didnt seem to notice the contradictions in the above
Btw, if you use memory realms you also have to configure the
"tomcat-users.xml" file in the TOMCAT_HOME/conf directory. Is there a
problem if you let that file floating around when using JDBC realms?

About the server.xml file:
In the servlet specification 2.3 they describe the structure of the web.xml
file. But I cant find the description of the server.xml file. So where is
that? That would be important to clarify what Element to use(<realm> or
<RequestInterceptor>). Btw I have renamed the element name but it didn't
work either. he

Thanks for any help and documentations...


View raw message