如何在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}