markt 2005/03/29 13:45:42 Modified: jasper2/src/share/org/apache/jasper Tag: tomcat_4_branch JspC.java Log: Fix bug 18477 by porting and extending fix for bug 28147 from TC5. - Based on a patch submitted by Daniel Collins. Revision Changes Path No revision No revision 1.12.2.13 +13 -17 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java Index: JspC.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v retrieving revision 1.12.2.12 retrieving revision 1.12.2.13 diff -u -r1.12.2.12 -r1.12.2.13 --- JspC.java 7 Mar 2005 21:57:45 -0000 1.12.2.12 +++ JspC.java 29 Mar 2005 21:45:42 -0000 1.12.2.13 @@ -411,8 +411,8 @@ try { File libFile = new File(lib, libs[i]); classPath = classPath + File.pathSeparator - + libFile.getCanonicalPath(); - urls.add(libFile.getCanonicalFile().toURL()); + + libFile.getAbsolutePath(); + urls.add(libFile.getAbsoluteFile().toURL()); } catch (IOException ioe) { // failing a toCanonicalPath on a file that // exists() should be a JVM regression test, @@ -557,7 +557,7 @@ } try { if (f.exists()) { - f = new File(f.getCanonicalPath()); + f = new File(f.getAbsolutePath()); while (f != null) { File g = new File(f, "WEB-INF"); if (g.exists() && g.isDirectory()) { @@ -727,20 +727,16 @@ Enumeration e = pages.elements(); while (e.hasMoreElements()) { String nextjsp = e.nextElement().toString(); - try { - File fjsp = new File(nextjsp); - if (!fjsp.exists()) { - Constants.message("jspc.error.fileDoesNotExist", - new Object[] {fjsp}, Logger.WARNING); - continue; - } - String s = fjsp.getCanonicalPath(); - //System.out.println("**" + s); - if (s.startsWith(uriRoot)) { - nextjsp = s.substring(uriRoot.length()); - } - } catch (IOException ioe) { - // if we got problems dont change the file name + + File fjsp = new File(nextjsp); + if (!fjsp.exists()) { + Constants.message("jspc.error.fileDoesNotExist", + new Object[] {fjsp}, Logger.WARNING); + continue; + } + String s = fjsp.getAbsolutePath(); + if (s.startsWith(uriRoot)) { + nextjsp = s.substring(uriRoot.length()); } if (nextjsp.startsWith("." + File.separatorChar)) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]