You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nikola Milutinovic <Ni...@ev.co.yu> on 2001/12/11 18:31:26 UTC

Can a JSP page include itself?

Hi all.

I'm working on a JSP page that will display a hierarchy of nodes. One node can 
have a "print" atribute, which should cause the subnodes to be "printed" on the 
same page. This I plan to acomplish with <jsp:include ...>

So something like:

<%
if( print ) {
   ...
   while( subNodesRS.next() ) {
%>
...
<jsp:include page="<%= \"displayNodes.jsp?partial=true&id=\" + nodeID %>" />
...
<%
   }
}
%>

This is a simplified version, but you get the point. The problem is, the first 
sub-node gets included, but all others are missing and so is the rest of the 
HTML code.

Could itbe that JSP page is calling "response.close()"?

Nix.


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>