dsp:equalEJB determines whether two EJBs have the same primary keys and saves the Boolean result to the object named by the var attribute.

Attributes

TagVariable:varorid(Required)

You must define an EL variable or scripting variable:

Attribute

Description

var

Names an EL variable. When you use var , you can set the scope attribute to page, request, session, and application, to specify the variable’s accessibility to other resources.

id

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

VariableScope:scope

The scope attribute determines what resources can access the named EL variable. Options include: page, request, session, or application. Omitting this attribute causes the default, page, to be used.

FirstEJBtoCompare:ejb1(Required)

The ejb1 attribute holds one EJB argument.

SecondEJBtoCompare:ejb2(Required)

The ejb2 attribute holds one EJB argument.

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...