Index: JspC.java =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v retrieving revision 1.96 diff -u -r1.96 JspC.java --- JspC.java 29 Apr 2005 17:18:22 -0000 1.96 +++ JspC.java 1 Jul 2005 03:46:56 -0000 @@ -47,6 +47,7 @@ import org.apache.jasper.compiler.TldLocationsCache; import org.apache.jasper.servlet.JspCServletContext; import org.apache.tools.ant.AntClassLoader; +import org.apache.tools.ant.Project; /** * Shell for the jspc compiler. Handles all options associated with the @@ -146,6 +147,7 @@ private String targetClassName; private String uriBase; private String uriRoot; + private Project project; private int dieLevel; private boolean helpNeeded = false; private boolean compile = false; @@ -596,6 +598,14 @@ } /** + * Ant project. Set by Ant when this class is invoked as a + * Task, so that the uriRoot can be resolved correctly. + */ + public void setProject( Project p ) { + project=p; + } + + /** * Base dir for the webapp. Used to generate class names and resolve * includes */ @@ -605,7 +615,11 @@ return; } try { - uriRoot=new File( s ).getCanonicalPath(); + if( null!=project ) { + uriRoot=new File(project.getBaseDir(), s).getCanonicalPath(); + } else { + uriRoot=new File( s ).getCanonicalPath(); + } } catch( Exception ex ) { uriRoot=s; }