ringo/ringojs — Issue #162: resources not resolved on websphere
Author: ischneider
Created: 2011-12-13 15:32:29+00:00
State: open

Websphere jar URLs used for resource loading in Ringo fail as the protocol is 'wsjar', not 'jar' as in other application servers. Inline patch:

diff --git a/src/org/ringojs/engine/RingoConfiguration.java
b/src/org/ringojs/engine/RingoConfiguration.java
index 5874cd8..b49f62c 100644
--- a/src/org/ringojs/engine/RingoConfiguration.java
+++ b/src/org/ringojs/engine/RingoConfiguration.java
@@ -559,7 +559,7 @@ public class RingoConfiguration {
URL url = urlFromClasspath(canonicalPath, loader);
if (url != null) {
String protocol = url.getProtocol();
- if ("jar".equals(protocol) || "zip".equals(protocol)) {
+ if ("jar".equals(protocol) || "zip".equals(protocol) ||
"wsjar".equals(protocol)) {
Repository repo = toZipRepository(url);
return repo.getChildRepository(path);
} else if ("file".equals(protocol)) {