YouTip LogoYouTip

Jstl Core Choose Tag

# , , Tags [![Image 3: JSP Standard Tag Library](#)JSP Standard Tag Library](#) The `` tag functions like the Java `switch` statement, used for making a choice among multiple options. The `switch` statement has `case`, while the `` tag has corresponding ``. The `switch` statement has `default`, while the `` tag has ``. ### Syntax Format <c:when test=""> ... <c:when test=""> ... ... ... ... ### Attributes * The `` tag has no attributes. * The `` tag has only one attribute, as given in the table below. * The `` tag has no attributes. The attributes of the `` tag are as follows: | **Attribute** | **Description** | **Required** | **Default Value** | | --- | --- | --- | --- | | test | Condition | Yes | None | * * * ## Example Demonstration c:choose Tag Example

Your salary is:

<c:when test="${salary Too bad. 1000}"> A decent salary, enough to live on. Nothing at all. The result is as follows: Your salary is: 4000A decent salary, enough to live on. * * JSP Standard Tag Library](#)
← Jstl Core Import TagJstl Core If Tag β†’