hi

The following recursive include example doesn't work, who can explain this
to me ...

<%-- recursiveInclude.jsp --%>
<%@ page contentType="text/html;charset=WINDOWS-1252" %>
<%@ page errorPage="errorPage.jsp" %>
<%
  int vLevel = -1;
  try
  {
    vLevel = Integer.parseInt(request.getParameter("pLevel"));
  }
  catch(NumberFormatException ex)
  {
    vLevel = -1;
  }
%>
<HTML>
<HEAD>
<TITLE>recursiveInclude</TITLE>
</HEAD>
<BODY>
<H2>recursiveInclude : <%= vLevel %></H2>
<%
  if (vLevel > 0)
  {
    vLevel = vLevel - 1;
    String vURL = "recursiveInclude.jsp?pLevel=" + vLevel;
%>
    vURL : <%= vURL %>
    <jsp:include page="<%= vURL %>" flush="true" />
<%
  }
%>
</BODY>
</HTML>
<%-- ----- --%>

I get the message :

--
javax.servlet.ServletException:
Unable to reload page: /jvv/jsppages/recursiveInclude.jsp because not at top
level.
Please resend request.
--

FYI : I'm using OJSP on Apache with JServ.

thanks
Jan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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