Taken from Tomcat’s reference page. Tomcat’s classloader hiararchy looks something like this:
Bootstrap
|
System
|
Common
/ \
Catalina Shared
/ \
Webapp1 Webapp2 .. etc
Classloader rules:
* Classloaders will only load the “same” class once.
* Two classes are only the “same” if they have the same name, and were loaded by the same classloader.
* When your webapp references a class, if it’s not already loaded, the search order goes:
yourWebapp –> Shared –> Common –> System –> Bootstrap
Post a Comment