Hi!

I have a problem with tomcat and include jsp command. If I try to include 
the same external file in a jsp page more than once (Example 1 or 2) I get 
an exception:

org.apache.jasper.compiler.ParseException: Seen file \html\IncludeThen.html 
already, maybe this is a recursive include?!
...

The answer of course is no! I only want include a file more than one time.

I tried to use JRun and the I-Planet engine for servlet and jsp and the 
same example works.

Is it a bug or I made a mistake?

I'm using:
Windows NT
Tomcat 3.1

Thank a lot
Gianluca Mameli

Please can you reply to: [EMAIL PROTECTED]

----------
Example 1:

<html>
<body>
<%@ include file="/html/Include.html" %>
<%@ include file="/html/Include.html" %>
</body>
</html>

----------
Example 2:

<html>
<body>

<%
  boolean bln = true;
  if (bln) {
%>
    <%@ include file="/html/Include.html" %>
<%
  } else {
%>
    <%@ include file="/html/Include.html" %>
<%
  }
%>

</body>
</html>

----------
Exception:

org.apache.jasper.compiler.ParseException: Seen file \html\IncludeThen.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:125)
        at 
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspPars  
eEventListener.java:686)
        at 
org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating  
Listener.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(J  
spServlet.java:149)
        at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspSe  
rvlet.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.http.HttpConnectionHandler.processConnection(H  
ttpConnectionHandler.java:160)
        at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java  
:338)
        at java.lang.Thread.run(Thread.java:484)




Reply via email to