如何检查JSP中的字段内容



我有表:

<c:forEach var="employee" items="${employees}">
    <tr>
        <td>${employee.id}</td>
        <td>${employee.gender.gender}</td>
        <td>${employee.name}</td>
        <td>${employee.surname}</td>
        <c:if test="${employee.appointment.appointment eq NAVIGATOR}">//Checking value of field
            <td>${employee.appointment.appointment}</td>
        </c:if>
    </tr>
</c:forEach>

我想检查字段的值:

$ {employee.Appointment.Appointment}

如何做?

如果您要检查员工的值。Appointment.Appointment.Appointment实际上是Navigator。

<c:if test="${employee.appointment.appointment eq 'NAVIGATOR'}">
      <td>${employee.appointment.appointment}</td>
</c:if>

最新更新