要使用JSTL需要先安装JSTL标签库,安装方法和详情见http://www.runoob.com/jsp/jsp-jstl.html
必须写(在JSP页面顶部),不然无法在该页面使用JSTL
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
使用以下标签可以循环加载${products}中的内容,直接加载出商品列表
<c:forEach var="product" items="${product }"> </forEach>
用于判断EL表达式中的内容是否符合
<c:if test="${user eq null}">
</c:if>
<c:if test="${user ne null}">
</c:if>