You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ho...@apache.org on 2001/07/10 22:12:14 UTC

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler ParserController.java

horwat      01/07/10 13:12:13

  Modified:    jasper/src/share/org/apache/jasper/compiler
                        ParserController.java
  Log:
  Fixes include bug. Nested include directive files were not found. In an include directive, the file should be found relative to the jsp file doing the including.
  
  Helpful hint:
  
    <%@ include file="XX" %> says "file" and is thus relative to the "JSP file".
    <jsp:include page="XXX" /> says "page" and is thus relative to the "JSP page".
  
  Bugzilla #2543
  
  Revision  Changes    Path
  1.16      +1 -2      jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ParserController.java	2001/06/02 18:44:45	1.15
  +++ ParserController.java	2001/07/10 20:12:07	1.16
  @@ -186,7 +186,6 @@
   
           String absFileName = resolveFileName(inFileName);
   	//p("filePath: " + filePath);
  -
   	String encoding = topFileEncoding;
           InputStreamReader reader = null;
           try {
  @@ -419,7 +418,7 @@
   	    isAbsolute ?
   	    inFileName : (String) baseDirStack.peek() + inFileName;
   	String baseDir = 
  -	    inFileName.substring(0, inFileName.lastIndexOf("/") + 1);
  +	    fileName.substring(0, fileName.lastIndexOf("/") + 1);
   	baseDirStack.push(baseDir);
   	return fileName;
       }
  
  
  

Re: cvs commit:jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compilerParser Controller.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 7/10/01 3:25 PM, "Rob S." <rs...@home.com> wrote:

> Ha!  I've been working with JSP since 1999 and I never caught that!

Even more proof!

:-)

JSP is overly complex and takes *years* to master.

:-)

-jon


RE: cvs commit:jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compilerParserController.java

Posted by "Rob S." <rs...@home.com>.
> >   <%@ include file="XX" %> says "file" and is thus relative to 
> the "JSP file".
> >   <jsp:include page="XXX" /> says "page" and is thus relative 
> to the "JSP
> > page".
> 
> Try teaching that to a web designer.
> 
> Bah. JSP sucks.

Ha!  I've been working with JSP since 1999 and I never caught that!

(That page vs. file thing, not that Jon thinks JSP sucks) ;)

- r


Re: cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler ParserController.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 7/10/01 1:12 PM, "horwat@apache.org" <ho...@apache.org> wrote:

>   <%@ include file="XX" %> says "file" and is thus relative to the "JSP file".
>   <jsp:include page="XXX" /> says "page" and is thus relative to the "JSP
> page".

Try teaching that to a web designer.

Bah. JSP sucks.

-jon