> -----Original Message-----
> From: Ravindar Reddy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 08, 2002 10:20 AM
> To: 'Tomcat Users List'
> Subject: Custom security realm/class loader issues
> 
> 
> 
> I wrote a custom security realm for authentication. This 
> realm class is 
> referring to the code in the web application. When I try to 
> deploy the 
> realm in the web app context I get:
> 
> (1) Class not found exception for support classes that are 
> defined in web 
> app. Because of indirect references, I had to copy all my web 
> application 
> libraries to server/lib folder to avoid this error.
> (2) When I copy web app libraries to server/lib folder I get 
> class cast 
> exception from the Apache digester library (I am using this 
> in my web app)
> 
> 
> Is there  anyway the realm code can resolve class references 
> from the web 
> app itself as it is configured in the web app context. 

no. see the classloader document in tocat-docs.

> I just want to avoid 
> coping all the web app libraries to server/lib folder to support all 
> classes referred in realm code.
> 

classes need to be in the same classloader or higher in the clasloader
heirarchy. You are trying to reference classes lower in classloader
heirarchy(webapp). The classloader document completely explains this.

Charlie

> I would very interested in knowing if there is any elegant 
> solution to this 
> other than putting all web app classes in system classpath or 
> server/lib 
> folder. I am working with Tomcat 4.0.3.
> 
> Regards
> -Reddy R
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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

Reply via email to