You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by la...@locus.apache.org on 2000/11/16 23:10:35 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler JspCompiler.java JspReader.java
larryi 00/11/16 14:10:35
Modified: src/share/org/apache/jasper/compiler Tag: tomcat_32
JspCompiler.java JspReader.java
Log:
Make isOutDated() return true if ctxt.getRealPath() returns null, instead of
throwing an NPE.
Make pushFile() throw a FNFE if context.getRealPath() returns null, instead
of throwing a parse exception later.
On case insensitive OS's, getRealPath() can return null if there is a case
mismatch in the path. These changes result in a more useful error response.
Revision Changes Path
No revision
No revision
1.14.2.2 +5 -1 jakarta-tomcat/src/share/org/apache/jasper/compiler/JspCompiler.java
Index: JspCompiler.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspCompiler.java,v
retrieving revision 1.14.2.1
retrieving revision 1.14.2.2
diff -u -r1.14.2.1 -r1.14.2.2
--- JspCompiler.java 2000/07/25 20:45:09 1.14.2.1
+++ JspCompiler.java 2000/11/16 22:10:35 1.14.2.2
@@ -304,7 +304,11 @@
public boolean isOutDated() {
File jspReal = null;
- jspReal = new File(ctxt.getRealPath(jsp.getPath()));
+ String realPath = ctxt.getRealPath(jsp.getPath());
+ if (realPath == null)
+ return true;
+
+ jspReal = new File(realPath);
File classFile = new File(getClassFileName());
if (classFile.exists()) {
1.16.2.5 +3 -0 jakarta-tomcat/src/share/org/apache/jasper/compiler/JspReader.java
Index: JspReader.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspReader.java,v
retrieving revision 1.16.2.4
retrieving revision 1.16.2.5
diff -u -r1.16.2.4 -r1.16.2.5
--- JspReader.java 2000/11/06 04:08:14 1.16.2.4
+++ JspReader.java 2000/11/16 22:10:35 1.16.2.5
@@ -171,6 +171,9 @@
? file.getAbsolutePath()
: context.getRealPath(file.toString());
+ if (longName == null)
+ throw new FileNotFoundException(file.toString());
+
int fileid = registerSourceFile(longName);
if (fileid == -1)