Hi,

I'm working with tobago 1.1.0 SNAPSHOT and run in a problem deploying my application on JBoss 5.0.0.GA on a windows machine. The problem arises when the theme jars are scanned for the obago config as JBoss 5 introduced a new protocol vfszip: - I already fixed for a Linux environment. The weird thing (for me) is that the URL class cannot handle the backslash itself - so I added a line replacing backslashes by slashes in case of File's separator char is backslash itself.

If you are interested a appended the patch file - you might want to remove the logging, feel free.

Regards,

Stefan.
Index: core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java
===================================================================
--- core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java	(revision 733496)
+++ core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java	Mon Jan 12 00:18:05 CET 2009
@@ -190,7 +190,11 @@
         // JBoss 5.0.0 introduced vfszip protocol
         if (protocol.equals("vfszip")) {
           fileName = new File(fileName).getParentFile().getParentFile().getPath();
+          if (File.separatorChar == '\\' && fileName.contains("\\")) {
+            fileName = fileName.replace('\\', '/');
+            LOG.info("Fixed slashes for virtual filesystem protocoll on windows system: " + fileName);
-        }
+          }
+        }
         jarFile = new URL(fileName);
       } catch (MalformedURLException e) {
         // workaround for weblogic on windows

Reply via email to