---
title: "tomcat中class加载顺序"
author: "tujunlan"
date: "2013-11-26T15:32:03Z"
tags: []
categories: ["开源软件"]
slug: "tomcat-class"
draft: false
lastmod: "2013-11-26T15:32:03Z"
id: 1980975
url: "https://tujunlan.iteye.com/blog/1980975"
---

Therefore, from the perspective of a web application, class or resource loading looks in the following repositories, in this order:

- Bootstrap classes of your JVM
- System class loader classes (described above)
- */WEB-INF/classes* of your web application
- */WEB-INF/lib/\*.jar* of your web application
- Common class loader classes (described above)

Classes which are part of the JRE base classes cannot be overridden. For some classes (such as the XML parser components in J2SE 1.4+), the J2SE 1.4 endorsed feature can be used. Last, any JAR file that contains Servlet API classes will be explicitly ignored by the classloader — Do not include such JARs in your web application.