tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Jiricka <petr.jiri...@netbeans.com>
Subject [PATCH] loading jar files from lib directory under SCCS
Date Tue, 05 Sep 2000 17:20:01 GMT
Hello,

my colleagues found a problem with jar files in the "lib" directory when
using SCCS-based version control systems (such as TeamWare).

The problem is that TeamWare creates a "SCCS" subdirectory under each
directory, and in this directory it creates files with similar names as the
original directory. So for example if the WEB-INF/lib directory contains a
file called library.jar, then WEB-INF/lib/SCCS directory will contain a file
called s.library.jar. This file is not a valid jar file. So when Tomcat adds
all jars from WEB-INF/lib and its subdirectories into its classpath, the
classloader will complain about a corrupted jar file and thow an exception.

This can be fixed by not including SCCS in the directories from which jar
files are recursively added into the web app classpath.

The following patch is against the tomcat_32 branch, the patch for Tomcat
3.3 would be analogous.

How do you feel about this patch ? And what about for tomcat_32 ? Also, do
you know any other version control systems which could have the same problem
?

Petr

cvs server: Diffing .
Index: LoaderInterceptor.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/context/Attic/LoaderInt
erceptor.java,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 LoaderInterceptor.java
--- LoaderInterceptor.java      2000/07/29 18:20:52     1.2.2.1
+++ LoaderInterceptor.java      2000/09/05 16:56:37
@@ -131,6 +131,8 @@
         FilenameFilter dirfilter = new FilenameFilter() {
                public boolean accept(File dir, String fname) {
                    File f1 = new File(dir, fname);
+                    if ("sccs".equals(fname.toLowerCase()))
+                        return false;
                    if(f1.isDirectory())
                        return true;






Mime
View raw message