JavaWeb——EL详解

mac2022-06-30  80

11个隐含对象(Implicit Object)分为三类:

1.与范围有关的隐含对象

applicationScope

sessionScope

requestScope

pageScope

2.与输入有关的隐含对象

param

paramValues

3.其他隐含对象

cookie

header

headerValues

initParam

pageContext

 

pageContext:pageContext即为PageContext类型,但只能读取属性

contextPath: ${pageContext.request.contextPath}

 

4.运算符

empty 可以作用于一个集合,若该集合不存在或集合中没有元素,其结果都为true

names is empty : ${empty requestScope.names}

 

三目运算符:

${param.score > 60 ? "及格" : "不及格"}

转载于:https://www.cnblogs.com/yangHS/p/11176160.html

最新回复(0)