While your servlet is servicing a request, Thread.getCurrentThread().getContextClassLoader() will give you the web application class loader, which has access to "b".
Cheers, Larry > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 10, 2002 10:06 AM > To: [EMAIL PROTECTED] > Subject: 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 > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
