> -----Original Message----- > From: Wendy Smoak [mailto:Wendy.Smoak@;asu.edu] > Sent: Friday, October 18, 2002 9:29 AM > > I came to Struts and JSTL at the same time, and I've heard > things like "You > should use forEach instead of iterate." I'm not clear on > which Struts tags > have exact replacements in JSTL, or whether I should always > prefer the JSTL > tag if there is one that does the same thing as a Struts tag. > Is there any > problem with nesting Struts tags inside of JSTL tags? > > <wish-list>Has anyone done a side-by-side comparison showing > the usage of > similar tags from both libraries?</wish-list>
Well, part of my preparation for buildings Struts-EL was doing this comparison. For each Struts tag, I looked carefully at the comparison between it and its analog (if any) in the JSTL. In some cases, the decision was not obvious. For instance, I concluded that there was functionality in the "logic:iterate" tag that I couldn't easily get with "c:forEach", so that tag stayed on my port list. In the README I wrote at the top of the "struts-el" directory, I noted some of these decisions. This information will eventually get into the user's guide, hopefully soon. In general, there's no reason you couldn't put Struts tags inside of JSTL tags which treat their body as JSP. Note that there's some obvious exceptions. The "indexed" feature of "logic:iterate" and various elements in the "html" library cannot interoperate with the JSTL tags (AFAIK). In the Struts-EL library, I built an "exercise-taglib" application, which is similar in scope to the similarly named application in the base distribution. However, I also added several test pages to cover Struts tags which I did not port to Struts-EL. These pages show how to get the same functionality using only JSTL tags. These are just samples, and are probably not exhaustive. -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>