Checks whether two EJBs have the same primary keys.

<dsp:equalEJB var-spec ejb1="ejb-spec" ejb2="ejb-spec" />

Attributes

var-spec

An EL variable or scripting variable that captures the Boolean result, defined with one of these attributes:

Attribute

Description

var

Names an EL variable. When you use var, you can set its scope attribute to page, request, session, or application. The default scope is page. For more information, see EL Variable Scopes in Chapter 2.

id

Names a scripting variable that scriptlets and expressions can access at runtime.

ejb1/ejb2

Specify the two EJBs to compare.

Example

<dsp:equalEJB var="frisbeeAdvertisement" ejb1="${winter}"
 ejb2="${currentSeason}"/>
    <c:choose>
        <c:when test="${frisbeeAdvertisement}">
            Try out for Ultimate Frisbee in April!
        </c:when>
    </c:choose>

When the current season is winter, the two EJBs have the same primary keys so this code sample advertises try outs for the ultimate Frisbee team.

 
loading table of contents...