[jboss-cvs] JBossAS SVN: r58764 - 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 Nov 29 20:00:38 EST 2006


Author: remy.maucherat at jboss.com
Date: 2006-11-29 20:00:37 -0500 (Wed, 29 Nov 2006)
New Revision: 58764

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/JBossContextConfig.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/VFSDirContext.java
Log:
- Some webapps do deploy (others do not work with a couple of strange errors).
- The servlet mapping parameters order should be inverted.
- A leaf doesn't like getChildren being called (for some reason, it would be easier to return an empty enum).

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/JBossContextConfig.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/JBossContextConfig.java	2006-11-29 23:24:59 UTC (rev 58763)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/JBossContextConfig.java	2006-11-30 01:00:37 UTC (rev 58764)
@@ -49,7 +49,7 @@
 	protected void applicationWebConfig() {
     	
     	// FIXME: also do parsing in Tomcat, as JBoss web.xml parsing is missing certain things
-    	super.applicationWebConfig();
+    	//super.applicationWebConfig();
     	
     	WebMetaData metaData = metaDataLocal.get();
     	
@@ -207,7 +207,7 @@
     	Iterator iterator8 = metaData.getServletMappings().iterator();
     	while (iterator8.hasNext()) {
     		ServletMapping value = (ServletMapping) iterator8.next();
-    		context.addServletMapping(value.getName(), value.getUrlPattern());
+    		context.addServletMapping(value.getUrlPattern(), value.getName());
     	}
     	
     	// FIXME: locale encoding mapping

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/VFSDirContext.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/VFSDirContext.java	2006-11-29 23:24:59 UTC (rev 58763)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/VFSDirContext.java	2006-11-30 01:00:37 UTC (rev 58764)
@@ -771,20 +771,22 @@
         throws IOException {
         
         ArrayList<NamingEntry> entries = new ArrayList<NamingEntry>();
-        Iterator<VirtualFile> children = entry.getChildren().iterator();
-        NamingEntry namingEntry = null;
+        if (!entry.isLeaf()) {
+            Iterator<VirtualFile> children = entry.getChildren().iterator();
+            NamingEntry namingEntry = null;
 
-        while (children.hasNext()) {
-            VirtualFile current = children.next();
-            Object object = null;
-            if (!current.isLeaf()) {
-                object = new VFSDirContext(current);
-            } else {
-                object = new VFSResource(current);
+            while (children.hasNext()) {
+                VirtualFile current = children.next();
+                Object object = null;
+                if (!current.isLeaf()) {
+                    object = new VFSDirContext(current);
+                } else {
+                    object = new VFSResource(current);
+                }
+                namingEntry = new NamingEntry
+                (current.getName(), object, NamingEntry.ENTRY);
+                entries.add(namingEntry);
             }
-            namingEntry = new NamingEntry
-                (current.getName(), object, NamingEntry.ENTRY);
-            entries.add(namingEntry);
         }
         
         return entries;




More information about the jboss-cvs-commits mailing list