tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Patch suggestion
Date Sat, 10 Apr 2010 18:32:42 GMT
In lieu of of a Bugzilla enhancement (and hoping that I have the right 
end of the stick).

In class:
org.apache.catalina.startup.HostConfig

In method:
protected void deployWARs(File appBase, String[] files) {

         if (files == null) {
             return;
         }

         for (int i = 0; i < files.length; i++) {

             if (files[i].equalsIgnoreCase("META-INF")) {
                 continue;
             }
             if (files[i].equalsIgnoreCase("WEB-INF")) {
                 continue;
             }
             File dir = new File(appBase, files[i]);

             // Check to see if the file is a .war that is still being 
modified
             if (files[i].toLowerCase().endsWith(".war")) {
                 long length = dir.length();
                 long modified = dir.lastModified();
                 try {
                     Thread.sleep(500);
                 }
                 catch (InterruptedException e) {
                     // Ignore this...
                 }
                 if ((dir.length() > length) || (dir.lastModified() > 
modified)) {
                     continue;
                 }
             }




p


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message