You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by terry Highfield <t_...@hotmail.com> on 2004/08/18 01:25:58 UTC

Recursive pages

Hi all,

Does anyone know how to make recursive jsp pages?

I believe this can be done using <%@ include file="recursive.jsp" %>

I have done this as :-

<nested:present property="replies" >
   <nested:iterate property="replies">
       <%@ include file="recursive.jsp" %>
   </nested:iterate>
</nested:present>
The above code is actually in recursive.jsp

The bean behind this has a structure :

class Message implements Serializable {
    int id
    String subject
    String messageText
    ArrayList replies     // Message objects

}

Not all messages have replies so this become likes a tree ADT - hence the 
need for recursion.


All I get is a recursive loop!

I did try using tiles but with this I get the error "Cannot flush within a 
custom tag" (even when I set flush to false), strange it only complains when 
within an iterate loop and equally annoying due to  the fact that I need to 
do it within an iterate loop.

This has been bugging me on and off for a week now and so any help would be 
greatly appreciated - thank you.


Terry.
aka: Ingenious Monkey

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org