tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gros, Martin" <gros_mar...@emc.com>
Subject RE: JSTL Recursion possible??
Date Tue, 03 May 2005 07:22:37 GMT

I want to build a tree, do something with every node b, and if node b has b
nodes as children, do the same to these b nodes, and if these b nodes has b
nodes as children, do the same to these, and if.......

I tried to capsule the jstl fragment to handle nodes into an own jsp file
and call this jsp with a c:import. The problem i had was to remember the
node and to give the current node into a variable. My "function" was called
infinite...

Martin


-----Original Message-----
From: Rahul P Akolkar [mailto:akolkar@us.ibm.com] 
Sent: Dienstag, 3. Mai 2005 03:51
To: Tag Libraries Users List
Subject: Re: JSTL Recursion possible??

I, for one, did not understand the question (or what the nesting you show
has to do with "JSTL recursion"). Can you please try again?

Thanks,
-Rahul

On 5/2/05, Gros, Martin <gros_martin@emc.com> wrote:
> JSTL and recursion, is this possible?
> 
> e.g. walk an xml tree with same element names on different levels?
> 
> <a>
>    <b/>
>    <b/>
>    <c>
>        <b/>
>    </c>
>    <c>
>        <b>
>            <b/>
>        </b>
>    </c>
>    <b>
> </a>
> 
> i want an output like
> 
> b
> b
> --b
> --b
> ----b
> b
> 
> is this possible? if yes, could you provide a short example?
> 
> thanks
> 
> Martin
> 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message