本帖最后由 小石姐姐 于 2018-5-23 14:37 编辑
EL&JSTL
EL&JSTLEL获取数据 以什么名字存到域中,就以什么名字取出来,存进去是什么类型的,取出来就是什么类型 数组,List:[] ----遍历map,java对象:. .属性 EL执行运算 empty:判断是否为空 not empty:判断是否不为空 lt gt le ge eq EL操作常用的web对象 ${cookie.名字.value} ${pageContext.request.contextPath} JSTL的中判断
<c:if test="${}">
test:如果test返回true,标签内的内容就会被输出
</c:if>
if标签没有else,如果想表达else的情况,从条件着手
JSTL中的遍历<c:forEach var="" items="" varStatus="status">
status.index
status.count
</c:forEach>
<c:forEach var="" begin="" end="" step="" varStatus="status">
</c:forEach>
|