You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by li...@meinsenf.at on 2002/09/10 16:05:59 UTC

classloader

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