[jboss-cvs] JBossAS SVN: r59023 - trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 13 19:02:19 EST 2006


Author: scott.stark at jboss.org
Date: 2006-12-13 19:02:16 -0500 (Wed, 13 Dec 2006)
New Revision: 59023

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment2.java
Log:
Ensure WEB-INF/classes is in the web loader path if it exists

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment.java	2006-12-14 00:01:50 UTC (rev 59022)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment.java	2006-12-14 00:02:16 UTC (rev 59023)
@@ -491,6 +491,25 @@
        * paths to the deployment UCL.
        */
       ArrayList<URL> classpath = (ArrayList<URL>) unit.getAttachment("org.jboss.web.expandedWarClasspath");
+      if( classpath == null )
+      {
+         try
+         {
+            VirtualFile classes = unit.getFile("WEB-INF/classes");
+            // Tomcat can't handle the vfs urls yet
+            URL vfsURL = classes.toURL();
+            String vfsurl = vfsURL.toString();
+            if( vfsurl.startsWith("vfs") )
+               vfsURL = new URL(vfsurl.substring(3));
+            classpath = new ArrayList<URL>();
+            classpath.add(classes.toURL());
+         }
+         catch(Exception e)
+         {
+            
+         }
+      }
+
       if (config.isUseJBossWebLoader())
       {
          WebCtxLoader jbossLoader = new WebCtxLoader(loader, injectionContainer);

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment2.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment2.java	2006-12-14 00:01:50 UTC (rev 59022)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment2.java	2006-12-14 00:02:16 UTC (rev 59023)
@@ -485,6 +485,25 @@
        * paths to the deployment UCL.
        */
       ArrayList<URL> classpath = (ArrayList<URL>) unit.getAttachment("org.jboss.web.expandedWarClasspath");
+      if( classpath == null )
+      {
+         try
+         {
+            VirtualFile classes = unit.getFile("WEB-INF/classes");
+            // Tomcat can't handle the vfs urls yet
+            URL vfsURL = classes.toURL();
+            String vfsurl = vfsURL.toString();
+            if( vfsurl.startsWith("vfs") )
+               vfsURL = new URL(vfsurl.substring(3));
+            classpath = new ArrayList<URL>();
+            classpath.add(classes.toURL());
+         }
+         catch(Exception e)
+         {
+            
+         }
+      }
+
       if (config.isUseJBossWebLoader())
       {
          WebCtxLoader jbossLoader = new WebCtxLoader(loader, injectionContainer);




More information about the jboss-cvs-commits mailing list