Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在JSP中检查字段的内容_Jsp_Jstl - Fatal编程技术网

如何在JSP中检查字段的内容

如何在JSP中检查字段的内容,jsp,jstl,Jsp,Jstl,我有一张桌子: <c:forEach var="employee" items="${employees}"> <tr> <td>${employee.id}</td> <td>${employee.gender.gender}</td> <td>${employee.name}</td> <td>${employee

我有一张桌子:

<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.id}
${employee.gender.gender}
${employee.name}
${雇员姓氏}
//字段的检查值
${employee.appointment.appointment}
我要检查字段的值:

${employee.appointment.appointment}


如何操作?

如果要检查employee.appointment.appointment的值,则需要将导航器放在类似“NAVIGATOR”的引号中

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

${employee.appointment.appointment}

如果要检查employee.appointment.appointment的值,则需要将导航器放在类似“NAVIGATOR”的引号中

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

${employee.appointment.appointment}