tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Teasdale" <>
Subject Specifying a Webapp classloader.
Date Mon, 30 Apr 2001 18:19:38 GMT
Hi Everybody,

I am trying to figure out how to have servlets within a Webapp (context)
use a specified class loader under  Tomcat Version 4.0 Beta... 

Currently, the "tomcat default" classloader used within my servlet is a
URLClassLoader whose codebase is a list of jar:jndi//WEB-INF/lib/ ...!/

Using from the servlet the following code:
 URL[] urls =
Will get a list of urls in the following form:

The problem is that URLClassLoaders getClassAnnotation() don't return
the URLs specified in my java.rmi.server.codebase...they simply return
those returned from the call to classloader.getURLs().

This is far from what I want!The only solution I currently have is to
create my own class loader "within" the servlet. there a way to configure tomcat so that either:

* it provides me a class loader that is not an instance of a
* It provides me with a class loader that I explicitly specify for the
context or my Webapp?



View raw message