tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Gomez" <>
Subject Tomcat 5.5 and HostConfig
Date Mon, 24 Jul 2006 13:59:23 GMT
I've got some problems on some of our production servers, running Suse
SLES 9 / IBM SDK 1.4.2 SR5 with webapp loading order.

>From what I saw in org.apache.catalina.startup.HostConfig, the
deployApps method make use of File.list() which is not guaranteed to
return the list of String in any particular order :

     * <p> There is no guarantee that the name strings in the resulting array
     * will appear in any specific order; they are not, in particular,
     * guaranteed to appear in alphabetical order.

What about using a simple Arrays.sort to have the list sorted in
alphabetical order and so have something coherent between JDK and
implementations ?

Here is the 'modified' deployApps method.

     * Deploy applications for any directories or WAR files that are found
     * in our "application root" directory.
    protected void deployApps() {

        File appBase = appBase();
        File configBase = configBase();
        // Deploy XML descriptors from configBase
        String [] list = configBase.list();
        deployDescriptors(configBase, list);
        // Deploy WARs, and loop if additional descriptors are found
        list = appBase.list();
        deployWARs(appBase, list);
        // Deploy expanded folders
        deployDirectories(appBase, list);



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

View raw message