You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2001/05/16 08:02:48 UTC
cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspCompiler.java
remm 01/05/15 23:02:48
Modified: jasper/src/share/org/apache/jasper/compiler JspCompiler.java
Log:
- JspCompiler shouldn't use a File here. Under Windows, it converts '/' to
'\\' which makes the URL connection class fail.
Revision Changes Path
1.6 +6 -6 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspCompiler.java
Index: JspCompiler.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspCompiler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JspCompiler.java 2001/03/22 03:40:02 1.5
+++ JspCompiler.java 2001/05/16 06:02:48 1.6
@@ -82,7 +82,7 @@
String javaFileName, classFileName;
String realClassName;
- File jsp;
+ String jsp;
String outputDir;
// ClassFileData cfd;
@@ -93,7 +93,7 @@
public JspCompiler(JspCompilationContext ctxt) throws JasperException {
super(ctxt);
- this.jsp = new File(ctxt.getJspFile());
+ this.jsp = ctxt.getJspFile();
this.outputDir = ctxt.getOutputDir();
this.outDated = false;
setMangler(this);
@@ -125,10 +125,10 @@
private final String getBaseClassName() {
String className;
- if (jsp.getName().endsWith(".jsp"))
- className = jsp.getName().substring(0, jsp.getName().length() - 4);
+ if (jsp.endsWith(".jsp"))
+ className = jsp.substring(0, jsp.length() - 4);
else
- className = jsp.getName();
+ className = jsp;
// Fix for invalid characters. If you think of more add to the list.
@@ -167,7 +167,7 @@
long jspRealLastModified = 0;
try {
- URL jspUrl = ctxt.getResource(jsp.getPath());
+ URL jspUrl = ctxt.getResource(jsp);
if (jspUrl == null)
return true;
jspRealLastModified = jspUrl.openConnection().getLastModified();