Revision: 1215
          http://stripes.svn.sourceforge.net/stripes/?rev=1215&view=rev
Author:   bengunter
Date:     2009-11-03 20:24:45 +0000 (Tue, 03 Nov 2009)

Log Message:
-----------
Fixed STS-723: Actions not found on WebLogic 10.0.

Modified Paths:
--------------
    branches/1.5.x/stripes/src/net/sourceforge/stripes/util/ResolverUtil.java

Modified: 
branches/1.5.x/stripes/src/net/sourceforge/stripes/util/ResolverUtil.java
===================================================================
--- branches/1.5.x/stripes/src/net/sourceforge/stripes/util/ResolverUtil.java   
2009-10-28 18:43:07 UTC (rev 1214)
+++ branches/1.5.x/stripes/src/net/sourceforge/stripes/util/ResolverUtil.java   
2009-11-03 20:24:45 UTC (rev 1215)
@@ -409,19 +409,35 @@
             log.trace("Extracted JAR URL: ", jarUrl);
         }
         else {
+            log.trace("Not a JAR: ", jarUrl);
             return null;
         }
 
         // Try to open and test it
         try {
             URL testUrl = new URL(jarUrl.toString());
-            if (isJar(testUrl))
+            if (isJar(testUrl)) {
                 return testUrl;
+            }
+            else {
+                // WebLogic fix: check if the URL's file exists in the 
filesystem.
+                log.trace("Not a JAR: ", jarUrl);
+                jarUrl.replace(0, jarUrl.length(), testUrl.getFile());
+                File file = new File(jarUrl.toString());
+                if (file.exists()) {
+                    log.trace("Trying real file: ", file.getAbsolutePath());
+                    testUrl = file.toURI().toURL();
+                    if (isJar(testUrl)) {
+                        return testUrl;
+                    }
+                }
+            }
         }
         catch (MalformedURLException e) {
             log.warn("Invalid JAR URL: ", jarUrl);
         }
 
+        log.trace("Not a JAR: ", jarUrl);
         return null;
     }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to