tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Glunde <tglu...@pcf-software.de>
Subject Re: PATCH - Fix for nested <% include ... %> bug
Date Fri, 02 Jun 2000 09:13:06 GMT
Hi Larry,

we have only one page a.jsp which tries to include b.jsp two times. it is like an error page
but only on some different if clauses so it is included some times.

for example a.jsp looks like this.

if (!tn.isavailable()) {
    <%include file "../noid.html"%>
}
if (!tn.isallowed()) {
    <%include file "../noid.html"%>
}

But by now I got compiled the sources from 31.5. again and now I get no more parse errors
without using your patch. Perhaps it went anything wrong when I tried to compile first time.
So indeed I think we got some other error then your patch is about, but what can it be?? No
idea about it.

Perhaps you can get something of my above example.

Torsten Glunde

Larry Isaacs schrieb:

> By "31.5", I assume you mean yesterday's source.
>
> I grabbed today's (6/1/2000) source with along with the "cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup
Tomcat.java" update and rebuilt.  The test provided continues to run.  It includes the "incr.jsp"
and "incs.jsp" mutiple times (but not recursively) without error.  Without the patch, the
log file would show that an included file wasn't found (because relative paths were always
formed relative to the original page instead of the parent page), and the browser would receive
no output from Tomcat.
>
> My patch doesn't actually address the "maybe this is a recursive include?!" error.  I
believe in Tomcat 3.1 final, including a file multiple times as in:
>
> a.jsp
>         includes b.jsp
>         includes c.jsp
>                 includes b.jsp
>
> would give this error because b.jsp was included twice, even though it isn't included
recursively.  This has been fixed in Tomcat 3.2, though by design it won't allow recursive
includes.
>
> What sequence of includes are you using that is giving this error?
>
> Larry
>
> -----Original Message-----
> From: Torsten Glunde [mailto:tglunde@pcf-software.de]
> Sent: Thursday, June 01, 2000 8:50 AM
> To: tomcat-dev@jakarta.apache.org
> Subject: PATCH - Fix for nested <% include ... %> bug
>
> Hallo,
>
> we have been working for jsp - web pages with apache jserv for some time
> ago. By now we want to step over to tomcat to interpret our jsp files,
> but we went into the same error described in the mail from Larry Isaacs.
> I tried to implement the bug fix, but after this we get again the same
> error.
>
> The page on which we get the above error tries to include the file more
> then one time. And we get the error for any page we are trying to
> include more then one time.
>
> I build the actual source from 31.5. and by now I am not sure if it is
> really the same bug we are working on.
>
> It would be kind to get an answer quickly
>
> Yours sincerely,
>
> Torsten Glunde
>
> "org.apache.jasper.compiler.ParseException: Seen file
> /wwwneu/memd/../index.html already, maybe this is a recursive include?!
>         at
> org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:152)
>         at
> org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:127)
>         at
> org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:686)
>
>         at
> org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)
>
>         at
> org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
>         at org.apache.jasper.compiler.Parser.parse(Parser.java:1073)
>         at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
>         at org.apache.jasper.compiler.Parser.parse(Parser.java:1034)
>         at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
>         at
> org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
>         at
> org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)
>
>         at
> org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
>
>         at
> org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
>
>         at
> org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>         at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
>
>         at
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
>
>         at java.lang.Thread.run(Thread.java:475)"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message