BBJSP CORE:Equal Tag (Deprecated)

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

Description

In BBj 16.0 and higher, the equal tag can be used within a BBJSP Page to compare two values and if they are equal then the body of the tag will be processed to write text to the resulting HTML output that will be sent to the client browser.

Attributes

Attribute Name

Description

Required

Expression

Data Type

value1

the value1 attribute the first value to be used in the comparison.

true

true

String

valuee

the value2 attribute the second value to be used in the comparison.

true

true

String

Remarks

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

Example

<!DOCTYPE html/>

<%-- WE MUST IMPORT THE TAG LIBRARY BEFORE WE CAN USE IT --%>
<%@ taglib uri='/WEB-CFG/tld/core.tld' prefix='c' %>

<html>
<head> 
<title><c:log></title> 
</head>
<body>
<p>
<a href='equal.bbjsp?v=<%= str(RND(3)+1) %>'>Click to try with a RANDOM number.</a>
</p>
<c:ifnotempty data='${param["v"]}'>
<c:equal value1='${param["v"]}' value2='2'>
<p>
The value received equals : 2
</p>
</c:equal>
<c:notequal value1='${param["v"]}' value2='2'>
<p>
The value received was ${param["v"]} which does not equal : 2
</p>
</c:notequal>
</c:ifnotempty>
</body>
</html>

See Also

BBJSP

Core Tag Library