Home > Guides > Tag Developers Guide > Struts Tags > Tag Reference > Generic Tag Reference > sort

Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.

Description

NOTE: JSP-TAG

A Tag that sorts a List using a Comparator both passed in as the tag attribute. If 'var' attribute is specified, the sorted list will be placed into the PageContext attribute using the key specified by 'var'. The sorted list will ALWAYS be pushed into the stack and poped at the end of this tag.

Parameters

Dynamic Attributes Allowed:

false
 

Name

Required

Default

Evaluated

Type

Description

comparatortruefalsejava.util.ComparatorThe comparator to use
idfalsefalseStringDeprecated. Use 'var' instead
sourcefalsefalseStringThe iterable source to sort
varfalsefalseStringThe name to store the resultant iterator into page context, if such name is supplied

Examples