tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sankaranarayanan (Ganesh) Ganapathy" <sganapa...@vitria.com>
Subject RE: [BULK] - Tomcat 4x Classloading
Date Tue, 28 Jan 2003 18:37:32 GMT
Has anybody seen this as well?

Any response will be greatly appreicated!

Thanx
Ganesh

-----Original Message-----
From: Sankaranarayanan (Ganesh) Ganapathy 
Sent: Monday, January 27, 2003 5:56 PM
To: tomcat-user@jakarta.apache.org
Subject: [BULK] - Tomcat 4x Classloading 


Hi All,

It has been my observation that the system CLASSPATH classes are loaded in precedence to the
web application class files. i.e if I had a web application class file in my CLASSPATH and
well as my web application class repository (WEB-INF/classes) - the one in the system CLASSPATH
is what is loaded. 

I looked at the source of the web application class loader - I see that the system classloader
is first given a chance to find the class file - to prevent the user from overriding the standard
J2SE classes. 

This is contrary to what the documentation in the apache site says. I have included the relevant
portions with this mail. 

Am I missing something here?

--Ganesh

When a request to load a class from the web application's WebappX class loader is processed,
this class loader will look in the local repositories first, instead of delegating before
looking. All other class loaders in Tomcat 4 follow the usual delegation pattern.
Therefore, from the perspective of a web application, class or resource loading looks in the
following repositories, in this order:
*	/WEB-INF/classes of your web application 
*	/WEB-INF/lib/*.jar of your web application 
*	Bootstrap classes of your JVM 
*	System class loader classses (described above) 
*	$CATALINA_HOME/common/classes 
*	$CATALINA_HOME/common/endorsed/*.jar 
*	$CATALINA_HOME/common/lib/*.jar 
*	$CATALINA_HOME/shared/classes 
*	$CATALINA_HOME/shared/lib/*.jar 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message