1.EL從域中取出數(shù)據(jù)
${var} 從全域中查找
2.EL內(nèi)置對象
pageContext-web開發(fā)中的pageContext
${pageContext.request}獲取request對象
${pageContext.request.contextPath} web應(yīng)用名稱
在提交頁面的action用的比較多
3.EL表達式
${1==1?true:false}
${empty user}判斷對象是否為空 user為鍵名
4.JSTL
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>導(dǎo)入
//1.條件語句表達式
<c:if test="${1==1 }">
xxxxx
</c:if>
<c:if test="${1!=1 }">
xxxxx
</c:if>
2.foreach標簽
//第一種foreach
<c:forEach begin="0" end="5" var="i">${i }</c:forEach>
//第二種foreach
<c:forEach items="${produstlist}" var="pro">
${pro.pname}
</c:forEach>