tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T-Vish...@niit.com
Subject Including jsp
Date Wed, 03 May 2000 10:57:50 GMT
Hi all,

I am having problem with including files in a jsp.

When I include the same file twice the error displayed is:
Internal Servlet Error:
org.apache.jasper.compiler.ParseException: Seen file \jsp\incl.jsp already,
maybe this is a recursive include?!
	at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java,
Compiled Code)
	at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:127)
	at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java, Compiled Code)
	at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:116)
	at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java,
Compiled Code)
	at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled
Code)
	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,
Compiled Code)
	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,
Compiled Code)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
	at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
	at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
	at java.lang.Thread.run(Thread.java:479)


The code is:

<html>
<table>
<tr>
<td>
After this place i will include first time
</td>
</tr>
<%@ include file="incl.jsp"%>
<tr>
<td>
After this place i will include second time
</td>
</tr>
<%@ include file="incl.jsp"%>
<td>
After this place i will include third time
</td>
</tr>
</table>
</html>


The incl.jsp is:
<%
	System.out.println("Hello how ru");
%>
<tr>
<td> 
This is the file i am including
</td>
</tr>


Please suggest the solution for this. The main use is to include the common
error.jsp at a number of places in the code.

Thanx
Vishal



Visit http://www.niit.com for eCommerce Solutions.



Mime
View raw message