summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-06-15 08:39:23 (EDT)
committerpelder2006-06-15 08:39:23 (EDT)
commit047be02bd1edba06821e8d63bd6ee39e48c86351 (patch)
treed82b9c3c840b131c7276f38899bf4407dd4b3387
parentc3c2a3636e477f2c5f53ab40254bde9f3936283e (diff)
downloadorg.eclipse.jet-047be02bd1edba06821e8d63bd6ee39e48c86351.zip
org.eclipse.jet-047be02bd1edba06821e8d63bd6ee39e48c86351.tar.gz
org.eclipse.jet-047be02bd1edba06821e8d63bd6ee39e48c86351.tar.bz2
[147114] Check for initial slash(/) on url argument and remove when adding a base URL.
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadTag.java4
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java5
2 files changed, 9 insertions, 0 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadTag.java
index e96b860..fa33454 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadTag.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadTag.java
@@ -61,6 +61,10 @@ public class LoadTag extends AbstractEmptyTag
TransformContextExtender tce = new TransformContextExtender(context);
URL baseURL = tce.getBaseURL(urlContext);
+ if(url.startsWith("/")) //$NON-NLS-1$
+ {
+ url = url.substring(1);
+ }
URL modelURL;
try
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java
index 9259d25..0ee75ff 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java
@@ -200,6 +200,11 @@ private static final String JMERGE_POSITION_CATEGORY = MergeTag.class.getName();
final URL baseURL = TransformContextExtender.getInstance(context).getBaseURL(rulesContext);
+ if(rules.startsWith("/")) //$NON-NLS-1$
+ {
+ rules = rules.substring(1);
+ }
+
try
{
URL rulesURL = new URL(baseURL, rules);