tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Rosenberger" <c...@db4o.com>
Subject Re: ***ANOTHER TOMCAT CLASSPATH BUG***
Date Sun, 24 Jun 2001 14:20:42 GMT
> > > When adding c:\java\my-web-app-dir\web-inf\classes to CLASSPATH
> > > Tomcat is loosing the jars in my c:\java\my-web-app-dir\web-inf\lib
> >
> > Two workarounds were possible:
> > - ..\project-dir\web-inf\classes added to the CLASSPATH
> > - placing all Jars in ..\project-dir\web-inf\lib
> >
>
> Isn't this due to how the classloaders work in a servlet container?
> Classloaders in Servlet 2.2 spec containers don't look down for classes,
> they look 'up'.  So a class in WEB-INF/lib won't be found by a class
> instantiated in an upper level loader.

Thanks for explaining how servlet classloaders work.

Do you have more information on the reason for this beviour? Why not use one
single classloader to be responsible for all levels? Is this a performance
issue? Would it take the classloader too long to scan all paths in all
directories for all possible classes that might be needed to work together?
In this case some intelligent caching could do the trick.

Kind regards,
Carl
---
Carl Rosenberger
db4o - database for objects - http://www.db4o.com



Mime
View raw message