tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <>
Subject Re: Question regarding class loading
Date Fri, 17 Dec 2010 12:18:57 GMT
Rishi Saraf schrieb am 17.12.2010 um 14:05 (+0530):
> I have two webapp in one tomcat(version 6.0) server instance as in
> application A and application B. On server startup server load first
> classes of A and then B.

It might load one webapp before the other. The order is undefined as
per the spec. If there was an order, it would be specific to Tomcat.

Webapp load order tomcat 4 vs tomcat 5

> My requirement is first load B and then A.

How exactly does A depend on B? You could implant a listener in A that
defers any initialization depending on B you might want to perform until
B is present, as suggested in this thread from 2007:

Webapp load order tomcat 4 vs tomcat 5

Note that webapps are designed to be decoupled from each other. If you
want coupling, you have to do the work yourself.

> How can is change the sequence of class loading of two application in
> same webapp folder?

The server loads the applications, and the order in which it does so
is undefined. Cross-application dependencies need to take this into

> Tomcat Version : 6.0

Michael Ludwig

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message