tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Crook, Charles" <>
Subject RE: can't dynamically load a class?
Date Wed, 16 Feb 2000 19:47:35 GMT
This also works ( or at least, it works with Jconnect ):

	sybDriver = (SybDriver)Class.forName( dbDriver ).newInstance();

-----Original Message-----
From: Danno Ferrin []
Sent: Wednesday, February 16, 2000 2:36 PM
Subject: Re: can't dynamically load a class?

With the new context specs in Servlet 2.2 some different things are
required to happen with classloader, such as each context has a separate
classloader instance.

try Class.forName("foo", this.getClass().getClassLoader())


Daniel Kehoe wrote:
> I'm trying to use the method Class.forName in a servlet and it
> doesn't work with Tomcat (worked fine with JServ and Jrun). I get a
> ClassNotFoundException. It should work, right?
> Daniel

View raw message