Hi again Craig.

> If ProsumerTestTag is being loaded from the class path, it's 
> being loaded
> by the system class loader.
> 
> If CustomTag is being loaded from the web app, it is being 
> loaded from the
> webapp class loader.

Judging by printing out the name of the classloaders being used at various
times, I was beginning to get this impression.

> Classes loaded from the system class loader CANNOT see 
> classes loaded from
> the webapp class loader -- therefore, Tomcat is telling you the truth.
> These restrictions are based on the way class loaders work in Java, so
> there's nothing Tomcat can do about it.

Right, I wasn't aware of this at all.

> Note that any of the following should work:
> * Put CustomTag and ProsumerTestTag both on the classpath
> * Put CustomTag and ProsumerTestTag both in the webapp
> * Put CustomTag on the classpath and ProsumerTestTag in the webapp
>   (webapp class loaders can look "up" the class loader hierarchy)

OK, I've tried your first suggestion, and that works.

Many thanks indeed for your authoritative answer.

Cheers,

Guy

Reply via email to