tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruth, Brice" <br...@fiskars.com>
Subject Re: Realm configuration not working
Date Thu, 05 Aug 2004 17:48:36 GMT
Dennis Dai wrote:

> On 8/5/2004 9:26 AM, Ruth, Brice wrote:
>
>> Greetings!
>>
>> I've recently decided to take advantage of Tomcat's authentication 
>> mechanism, however, it doesn't appear to be working for me. I've 
>> configured a Realm in my context (through the admin tool). It is a 
>> DataSourceRealm.
>>
>> When I've tested everything, I keep getting pushed out to the error 
>> page that I've configured in my login settings. Since I couldn't 
>> figure out what was going on when I screwed up the debugging levels, 
>> I grabbed the source and started stepping through it in my debugger. 
>> Here's where it gets interesting. When FormAuthenticator.java gets 
>> the Realm to authenticate against:
>>
>> Realm realm = context.getRealm();
>>
>> The Realm that is returned is Tomcat's global "UserDatabaseRealm" - 
>> not my DataSourceRealm. At this point, its no wonder that the 
>> authentication isn't succeeding!!
>>
>> Why isn't Tomcat using the Realm configured in the context?! This is 
>> on Tomcat 5.0.27 under jdk 1.4.2.
>>
>> Any help would be appreciated!!
>>
>
> Make sure <resource-ref /> in web.xml is pointing to the correct 
> resource (ie., the one in the context).
>
OK, I don't know what was going on ... but when I went to start 
copy/pasting my config files into this email, I saw that my context's 
XML file in Catallina/localhost didn't have a Realm in it any longer. 
What?! I obviously didn't dream that I configured it & committed the 
changes ... ugh. Maybe I did forget to commit the changes, who knows?! 
Man-o-man.

Thanks, though. Its all working now. Very nice :)

-- 
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message