It's all described in Tomcat's ClassLoading HOW-TO, which is similar for Tomcat different version. Summarized, the loading order is as follows:
- bootstrap/system (
JRE/lib, thenserver.loader) - webapp libraries (
WEB-INF/classes, thenWEB-INF/lib) - common libraries (
common.loader, thenTomcat/lib) - webapp-shared libraries (
shared.loader)
One point NOT documented, NOT specified is when it comes to loading a JAR from respective classloader it follows:
- For tomcat 5-7 the order is alphabetical. It uses sort.
- For tomcat 8 is random decided by underlying file system. Issue tracker is discussed.
No comments :
Post a Comment