Hello,

I have one jsp page say index.jsp. I use Apache 1.3.12 and Tomcat 3.1
version on win98.
code for index.jsp is below.

<html>
<head>
<title>Include Problem</title>
</head>
<body>
<h2>some html + jsp code</h2>

<!-- myinclude.jsp - Start -->
<%@ include file="include/myinclude.jsp" %>
<!-- myinclude.jsp - End -->

<h2>some html + jsp code</h2>

<!-- myinclude.jsp - Start -->
<%@ include file="include/myinclude.jsp" %>
<!-- myinclude.jsp - End -->

<h2>some html + jsp code</h2>
</body>
</html>

Problem :

my problem is, in above code I include same file (myinclude.jsp) twice. So
when I execute this JSP, then I got error message like,

"Seen File \include\myinclude.jsp already, maybe this is a recursive include
?!"

This error shows, only once I include some particular file (in my case
myinclude.jsp) in current jsp page. IS THIS CORRECT ?

To solve this problem I copy myinclude.jsp to myinclude1.jsp and
myinclude2.jsp (both 1 & 2 file content is same).

Then I modify my code like this way.

<html>
<head>
<title>Include Problem</title>
</head>
<body>
<h2>some html + jsp code</h2>

<!-- myinclude.jsp - Start -->
<%@ include file="include/myinclude1.jsp" %>
<!-- myinclude.jsp - End -->

<h2>some html + jsp code</h2>

<!-- myinclude.jsp - Start -->
<%@ include file="include/myinclude2.jsp" %>
<!-- myinclude.jsp - End -->

<h2>some html + jsp code</h2>
</body>
</html>


IS THERE ANY OTHER SOLUTION TO THIS PROBLEM ?


Regards,
Bhavesh Vakil.
[EMAIL PROTECTED]



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to