以下哪一项更好?
<c:set var="var1" value="false" scope="request"/> <c:if test="${someCondition}"> <c:set var="var1" value="true" scope="request"/> </c:if>
或以下
<c:choose> <c:when test="${someCondition}"> <c:set var="var1" value="true" scope="request"/> </c:when> <c:otherwise> <c:set var="var1" value="false" scope="request"/> <c:otherwise> </c:choose>
两者都不适合我:
<c:set var="var1" value="${someCondition}" scope="request"/>