diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
index 174968b3a..2a7aa721a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
@@ -118,6 +118,20 @@ public class JspC extends MatchingTask
private int verbose = 0;
protected Vector compileList = new Vector();
protected boolean failOnError = true;
+
+ /**
+ * -uribase
The uri directory compilations should be relative to
+ * (Default is "/")
+ */
+
+ private File uribase;
+
+ /**
+ * -uriroot The root directory that uri files should be resolved
+ * against,
+ */
+ private File uriroot;
+
private static final String FAIL_MSG
= "Compile failed, messages should have been provided.";
/* ------------------------------------------------------------ */
@@ -198,6 +212,38 @@ public class JspC extends MatchingTask
{
mapped = mapped_;
}
+
+ /**
+ * -uribase. the uri context of relative URI
+ * references in the JSP pages. If it does not
+ * exist then it is derived from the location of the file
+ * relative to the declared or derived value of -uriroot.
+ *
+ * @param uribase The new Uribase value
+ */
+ public void setUribase(File uribase) {
+ this.uribase = uribase;
+ }
+
+ public File getUribase() {
+ return uriroot;
+ }
+
+ /**
+ * -uriroot The root directory that uri files should be resolved
+ * against, (Default is the directory jspc is invoked from)
+ *
+ * @param uriroot The new Uribase value
+ */
+ public void setUriroot(File uriroot) {
+ this.uriroot = uriroot;
+ }
+
+ public File getUriroot() {
+ return uriroot;
+ }
+
+
/* ------------------------------------------------------------ */
/** Set the classpath to be used for this compilation */
public void setClasspath(Path cp) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
index 92a8d1749..39a651338 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
@@ -120,7 +120,14 @@ public class JasperC extends DefaultCompilerAdapter
cmd.createArgument().setValue("-ieplugin");
cmd.createArgument().setValue(jspc.getIeplugin());
}
-
+ if (jspc.getUriroot() != null){
+ cmd.createArgument().setValue("-uriroot");
+ cmd.createArgument().setValue(jspc.getUriroot().toString());
+ }
+ if (jspc.getUribase() != null){
+ cmd.createArgument().setValue("-uribase");
+ cmd.createArgument().setValue(jspc.getUribase().toString());
+ }
logAndAddFilesToCompile(getJspc(), getJspc().getCompileList(), cmd);
return cmd;
}