tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Cavacas <john....@sapiens.com>
Subject Recursion with JSTL tags
Date Fri, 02 May 2003 19:59:11 GMT
Hi,

This may seem like a silly question, but I was wondering if there was a way
to achieve recursive behavior out of the core and xml tags.

I have this XML file which contains date in a tree format. Using the Core
and Xml tags, I use this XML file to build a navigation menu, where each
level is indented. Like:

Link 1
Link 2
 Link 21
  Link 211
 Link 22
Link 3

Etc.

Currently, I'm parsing the XML using the X tags, and I have to have a set
level of 3 levels, and a lot of duplicated code, in order to create such a
structure. This is begging for a recursive call, however I can't seem to
figure out how or if it is even possible using JSTL.

I've thought of maybe using include files, where there is one include file
which generates One level, and then it includes another JSP file, which
generates the second level, and includes itself to generate the third, and
so on levels. That's what I am currently experimenting with.

Does anyone have any ideas or suggestions? Again, sticking with JSTL use
only, I know this would be fairly easy to do other wise.

Many thanks,
John



This communication is intended for the use of the individual(s) or entity it
was addressed to and may contain confidential and/or privileged information.
If the reader of this transmission is not the intended recipient, you are
hereby notified that any review, dissemination, distribution or copying of
this communication is prohibited.  If you receive this communication in
error, please notify the sender immediately and delete this communication
from your system(s) to which it was sent and/or replicated to. (c) 2002
Sapiens Americas Corp.

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


Mime
View raw message