[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ClassLoader problem in Servlet environment (Tomcat)



On Fri, 09 Mar 2001, Falko Braeutigam wrote:
> On Fri, 09 Mar 2001, Nathan Eric Probst wrote:
  : 
> > I can make it work with RemoteDatabase by putting my WEB-INF/classes
> > directory in the classpath when I start ozone, but this is not a good
> > solution.
> 
> There are two ClassLoaders in ozone, one for jdk1.1 and one for jdk1.2+. By
> default the 1.1 is used. This one calls Class.forName() to actually get the
> class. I'm not sure if Class.forName() uses the threads ClassLoader which is
> needed to get the servlet ClassLoader which probably has access to the WEB-INF
> classes. I will check this. Stay tuned.

I've committed a small patch. ClassManager now uses context loader directly
instead of the ozone loader. Thus the ozone server should now have access to
all the classes that the servlet engine wants to make available to your servlet
(WEB-INF/classes).


Falko

> 
> 
> Falko
> 
> > 
> > In fact, I need to be able to use only a LocalDatabase and no special
> > classpath treatments.  The app I'm developing will be deployed to a
> > third-party hosting provider where I will not have control over the
> > environment.  So, everything need to work from within the servlet
> > context.
> > 
> > Please help!
> > 
> > Thanks,
> > Nathan Probst
> -- 
> ______________________________________________________________________
> Falko Braeutigam                              mailto:falko@smb-tec.com
> SMB GmbH                                        http://www.smb-tec.com
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com