<c:if test="${empty middleName}">
<c:out value="Middle name is empty"/>
</c:if>
或者
<c:choose>
<c:when test="${empty middleName}">
<c:out value="Middle name is empty"/>
</c:when>
<c:otherwise>
<c:out value="Middle name is NOT empty"/>
</c:otherwise>
</c:choose>