tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <>
Subject Re: jstl sort
Date Tue, 06 Aug 2002 12:46:45 GMT
On Tue, 6 Aug 2002, ├×orgils V├Âlundarson wrote:

> Is it possible to sort information from jstl x:forEach?

JSTL's <x:forEach> tag always uses the order of the node-set returned from
the XPath 'select' attribute.  JSTL's <c:forEach> always returns the items
in collection order.  In JSTL 1.0, there isn't a way to modify this
behavior.  The best thing to do is to sort the collection or node-set
outside of your JSP page (e.g., in a servlet) and then expose the sorted
collection to your page.

Shawn Bayern
"JSTL in Action"

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message