You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Larry Isaacs <La...@sas.com> on 2000/06/19 18:14:58 UTC
RE: [PATCH] Fix for nested <% include ... %> bug
Hi Milan,
Your error is a known problem in Tomcat 3.1, where you can not <%@ include ... %> a file more than once, even when not recursive. This problem has been fixed in Tomcat 3.2 and the JSP you attached runs fine.
My patch was for a different bug, which has not yet been fixed in Tomcat 3.2. This is where "a.jsp" contains <%@ include file="inc/b.jsp" %> and inc/b.jsp contains <%@ include file="c.jsp" %>. Tomcat 3.2 currently will look for c.jsp in the same directory as a.jsp instead of the inc directory where b.jsp is located.
Larry
-----Original Message-----
From: Milan Adamovic [mailto:madamovic@lbmsystems.com]
Sent: Friday, June 16, 2000 9:14 PM
To: Larry.Isaacs@sas.com
Subject: [PATCH] Fix for nested <% include ... %> bug
Hi Larry,
I am not sure that I am addressing the right person, sorry if I am not.
I found your message while searching Tomcat archive:
http://www.metronet.com/~wjm/tomcat/FromFeb11/msg02529.html
PROBLEM:
Within one jsp file, I am trying to include another file in two different
places (using <%@ include ...). The file works with Oracle JDeveloper, but
not with Tomcat.
Is this the bug that you are referring to? If it is, how can I get a fix?
I am using Tomcat 3.1.
Below is the error message that I get, and attached is the example based on
the famous Guess Number.
Thanks for your help!
Milan
org.apache.jasper.compiler.ParseException: Seen file
/jsp/madamovic/numguessform.jsp 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(JspParseEve
ntListener.java:686)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.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(JspSe
rvlet.java:149)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va: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)