Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse JET Guide
Previous Page Home Next Page


Standard JET2 Control Tags


Define a group of mutually exclusive choices. The contents of this tag are restricted to 'when' and 'otherwise' tags only.

During execution of this tag, each 'when' and 'otherwise' tag is evaluated in sequence. If one of these tags evaluates to 'true', then any subsequent tags are ignored. A 'when' tag evaluates to 'true' if its 'test' attribute's XPath expression evaluates to 'true'. An 'otherwise' tag evaluates to 'true' if no preceeding 'when' (or 'otherwise') tag has evaluated to true.

Tag Summary
required <c:choose>
    content to be written
full tag <c:choose select="value">
    content to be written

Optional Attributes
Optional test expression. When specified, each 'when' tag 'test' expression is tested for equality against this value. When not specified, this is the equivalent of the XPath expression 'true()'.

<%-- evaluate one of a number alternatives --%>
<c:when test="$var/@value = 1">
    handle case 1
<c:when test="$var/@value >= 2">
    handle case 2
    handle other cases

<%-- evaluate an expression against constances --%>
<c:choose select="$var/@num">
<c:when test=" 'one' ">
    handle case 'one'
<c:when test=" 'two' ">
    handle case 'two'
    handle other cases

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire