> while I am not completely familiar with classloading in 3.3, you need to
> have your classes in the same directory(or higher in the classloading
> heirarchy) so that they are loaded by the same classloader. Therefore 2.jar
> must go into /lib/apps. There should be a classloader document with 3.3
> that explains this.

well, I understand the way tomcat loads its classes and that tomcat can't 
expand the classpath after loading the VM (so tomcat would need to know all 
contexts *before* the VM is started - but tomcat is written in java, so it 
can't do that without the VM ... ;-) )

my problem:
I have many jar-files only needed by *one* context, but I have to put all 
that jar-files into the same directory (/lib/apps) - that's not very easy to 
maintain!!!

so I thought of writing a kind of classloader, that additionaly loads classes 
from jar-files in /webapps/<context>/WEB-INF/lib (but I never did this before 
- and I don't know if it's possible!!!)
this classloader is instantiated by the servlet; and all classes that are not 
found by the VM-classloader, are loaded using MY classloader ...

any idea???

thanks
any hints appreciated
michi

> >
> > Hi!
> >
> > (using tomcat 3.3.1)
> > I use a package in "1.jar", visible to all tomcat-contexts -
> > so I put it into "$TOMCAT_HOME/lib/apps"
> >
> > the servlet creates an instance of a class "a" (that is
> > included in "1.jar")
> > "a" reads 'getServletContext().getInitParameter("config-file")'
> > from this config-file "a" reads the name of another class (b)
> > "a" creates an instance "b" using the reflection-package of java
> >
> > my question:
> > the jar-file "2.jar" holding class "b" *must* be in tomcat's
> > classpath!!!
> > so I have to put it also in tomcat/lib/apps - but I would
> > prefer to put the jar file into:
> > '/tomcat/webapps/context/WEB-INF/lib'
> > but how to make "a" find class "b" ???
> >
> > thanks
> > michi
>
> --
> 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