tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <>
Subject RE: Configuring a Realm
Date Tue, 06 Jan 2009 15:21:24 GMT
> From: Charl Gerber []
> Subject: Configuring a Realm

> I know I somehow have to configure the <login-config>
> to use my new Realm, but how?

No, you don't, other than to indicate the authentication mechanism.  The presence of the <Realm>
element inside your webapp's <Context> should be sufficient to cause Tomcat to use it.

> There is a tag <realm-name> which looked to be my answer

The <realm-name> here is not related to the configured <Realm>, at least for BASIC
authentication; as I recall it's used primarily for DIGEST authentication to construct the
hash key.

> The datasource works and can be tested from within the
> application, so it is set up correctly.

Are you using the same database for both application usage and authentication?  That's odd,
but doable.

> The application's context.xml:

Where is the context.xml file located?

> <Context path="/rankings"
>          docBase=""

If the context.xml file is in the webapp's META-INF directory, the path and docBase attributes
are not allowed - remove them.

Is there a conf/Catalina/[host]/rankings.xml file present?  If so, it will override the context.xml
in META-INF, meaning your <Realm> element will be ignored.

Is there anything in the Tomcat logs pertinent to the use of the <Realm>?

 - Chuck

for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message