JSTL Early Access | Beware API and Tags may/will change | support development comments to JSR052 EG |
JSTL Examples Introduction EL Support Conditionals Iterators Import I18N & Formatting XML SQL EcmaScript Misc. |
Customers from the USA will be printed in blue, those from Canada in red, and others in green.
JSTL exposes in its API the abstract class ConditionalTagSupport to facilitate the implementation of custom conditional tags that leverage the standard conditional behavior defined in JSTL. This example shows custom tag <usCustomer> that returns true if its customer attribute value points to a US customer. It can be used both in the context of a simple conditional execution, as well as in the context of a mutually conditional execution by exposing the result of the conditional execution in a JSP page attribute via the tag attribute 'var'.
JSTL Early Access | Beware API and Tags may/will change | support development comments to JSR052 EG |