remm 2004/04/25 04:54:04
Modified: jasper2/src/share/org/apache/jasper JspC.java
Log:
- Remove canonicalization, which is not very useful here, and can cause trouble with
symlinks.
- Bug 28147, submitted by Rick Wong.
Revision Changes Path
1.70 +11 -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.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- JspC.java 6 Apr 2004 17:58:59 -0000 1.69
+++ JspC.java 25 Apr 2004 11:54:04 -0000 1.70
@@ -830,28 +830,22 @@
Enumeration e = pages.elements();
while (e.hasMoreElements()) {
String nextjsp = e.nextElement().toString();
- try {
- File fjsp = new File(nextjsp);
- if (!fjsp.exists()) {
- if (log.isWarnEnabled()) {
-
log.warn(Localizer.getMessage("jspc.error.fileDoesNotExist",
- fjsp.toString()));
- }
- continue;
+ File fjsp = new File(nextjsp);
+ if (!fjsp.exists()) {
+ if (log.isWarnEnabled()) {
+ log.warn
+ (Localizer.getMessage
+ ("jspc.error.fileDoesNotExist", fjsp.toString()));
}
- 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
+ continue;
+ }
+ String s = fjsp.getAbsolutePath();
+ if (s.startsWith(uriRoot)) {
+ nextjsp = s.substring(uriRoot.length());
}
-
if (nextjsp.startsWith("." + File.separatorChar)) {
nextjsp = nextjsp.substring(2);
}
-
processFile(nextjsp);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]