geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r394320 - /geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Date Sat, 15 Apr 2006 16:10:18 GMT
Author: kevan
Date: Sat Apr 15 09:10:17 2006
New Revision: 394320

URL: http://svn.apache.org/viewcvs?rev=394320&view=rev
Log:
Make sure WEB-INF/classes is properly added to the CLASSPATH during jsp/servlet deployment

Modified:
    geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java

Modified: geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java?rev=394320&r1=394319&r2=394320&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Sat Apr 15 09:10:17 2006
@@ -194,6 +194,7 @@
             // add the warfile's content to the configuration
             JarFile warFile = module.getModuleFile();
             Enumeration entries = warFile.entries();
+            boolean addedClasses = false;
             while (entries.hasMoreElements()) {
                 ZipEntry entry = (ZipEntry) entries.nextElement();
                 URI targetPath = new URI(null, entry.getName(), null);
@@ -201,10 +202,12 @@
                     moduleContext.addFile(targetPath, module.getOriginalSpecDD());
                 } else if (entry.getName().startsWith("WEB-INF/lib") && entry.getName().endsWith(".jar"))
{
                     moduleContext.addInclude(targetPath, warFile, entry);
-                } else if (entry.getName().equals("WEB-INF/classes/")) {
-                    moduleContext.addInclude(targetPath, warFile, entry);
                 } else {
                     moduleContext.addFile(targetPath, warFile, entry);
+                    if (!addedClasses && entry.getName().startsWith("WEB-INF/classes/"))
{
+                        addedClasses = true;
+                        moduleContext.getConfiguration().addToClassPath(new URI(null, "WEB-INF/classes/",
null));
+                    }
                 }
             }
 



Mime
View raw message