Thank you Jon,

That's what I'm also trying but I always get a NPE because
JNDIRealm.containerLog is null.

Do you know how I can figure out the Container from for example a Filter?

In the case I could call realm.setContainer(container) no NPE would happen.

Zsolt


>-----Original Message-----
>From: Jon Wingfield [mailto:[EMAIL PROTECTED]
>Sent: Thursday, February 23, 2006 5:05 PM
>To: Tomcat Users List
>Subject: Re: How to configure my Realm class from context.xml?
>
>Your Realm implementation needs to sit in the server classloader as the
>Realm interface is only defined there (in catalina.jar).
>
>This is a PITA so when we did this we made the Realm implementation just
>lookup the real implementation via JNDI. That way all the authentication
>logic stayed in the webapp and only a couple of simple wrapper classes
>and interfaces went into the server and common classloaders.
>
>HTH,
>
>Jon
>
>Zsolt wrote:
>> Does anybody know how to configure <Realm from .../META-INF/context.xml?
>>
>> <Realm className="my.realm.JNDIRealm"
>>   resourceName="my/RealmFactory"/>
>>
>> I always get a ClassNotFoundException but the class does exist (under
>> ../WEB-INF.
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to