On Mon, 22 Oct 2001, Jonathan Eric Miller wrote:

> Date: Mon, 22 Oct 2001 17:06:16 -0500
> From: Jonathan Eric Miller <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: Tomcat User List <[EMAIL PROTECTED]>
> Subject: How to call code in catalina.jar from a servlet?
>
> I'm wondering if it is possible to call code that is located in catalina.jar
> from a normal servlet?
>
> Specifically, I want to call the following method in order to create a hash
> that is in the format the JDBCRealm expects so that I can have a form which
> allows users of my application to change their passwords which I have stored
> in a SQL database that is queried by JDBCRealm.
>
> org.apache.catalina.realm.JDBCRealm.Digest(password, "SHA");
>
> catalina.jar is stored in server/lib and as far as I can tell is not visble
> to normal servlets by default. I tried copying it to common/lib, but, I
> receive an error message when I do that.
>
> Anyone know if there is a way to do this?
>
> Jon
>
>
>

Because of the way the class loaders are organized, this is not possible
in the default configuration -- the classes in catalina.jar are
deliberately stored in a class loader that is not visible to servlet
classes.  You'd need to copy out the classes you need.

Craig


Reply via email to