BBJSP CORE:Otherwise Tag (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 16.0 and higher, the otherwise tag can be used within a <CORE.Choose> in a BBJSP Page to write text to the resulting HTML output that will be sent to the client browser when none of the <CORE.When> conditions are met.

Attributes

None.

Remarks

The Core Tag Library library needs to be referenced in the BBJSP Page

The following example demonstrates using the <CORE.Choose> tag with the child <CORE.When> and <CORE.Otherwise> tags

Example

<!DOCTYPE html/>

<%-- Import the tag library --%>
<%@ taglib uri='/WEB-CFG/tld/core.tld' prefix='c' %>

<html>
<head> 
<title><c:choose></title> 
</head>
<body>
<p>
<a href='choose.bbjsp?v=<%= str(RND(7)+1) %>'>Click to try with a RANDOM number.</a>
</p>
<c:if test='${param["v"]}'>
<p>
<div style="text-align: center;font-size:150%">
The value received was : 
<c:choose>
<c:when test='${param["v"] = 1}'>ONE</c:when>
<c:when test='${param["v"] = 2}'>TWO</c:when>
<c:when test='${param["v"] = 3}'>THREE</c:when>
<c:when test='${param["v"] = 4}'>FOUR</c:when>
<c:when test='${param["v"] = 5}'>FIVE</c:when>
<c:otherwise>${param["v"]} <small>(invalid, only 1 - 5 allowed)</small></c:otherwise>
</c:choose>
</div>
</p>
</c:if>
<br>
</body>
</html>

See Also

BBJSP

Core Tag Library

<CORE.Choose>

<CORE.When>