第一种:使用等号==判断
<c:if test="${v==1 && u==2}"></c:if>
第二种:使用eq判断
<c:if test="${v eq 1 and u eq 2}"></c:if>
对数值判断相等:可以用==也可以用eq
对字符串判断相等:用eq
多个值用&& 或者and 连接
对EL表达式中取到的值进行判断后显示:
<c:if test="${list.status eq 1}">正确<c:if>
<c:if test="${list.status eq 2}">错误<c:if>
然后记得在页面头部导入C标签
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>