1、常量
布尔型:${true}
整型${10}
浮点型${10.5}
字符串型${"zhen"}
空类型${null}
EL表达式的结果为null,什么也不显示,结果如果不是null,是什么就显示什么
2、运算
EL算数运算符 + - * /或% mod
EL关系运算符== 、eq、!=、
EL逻辑运算符&& and or not !
其他运算符${A?B:C}
${param.password1==param.password2}正确
${param.password1}=={param.password2}不正确
empty:用来判断值是否为null,null就返回true 不是null就返回false
3、变量
EL在对表达式中的变量进行操作时,它通过pageContext.findAttribute("")方式来查找变量
依次从page request session application中查找
如果都没有查找到,就返回null
在指定域中查找:${pageScope.变量名} ${requestScope.变量名} ${sessiontScope.变量名}
${applicationScope.变量名}
访问属性用.和[] 如:
${object.attribute} ${object["attribute"]} ${object.attribute.attribute} ${object["attribute"]t["attribute"]}
4、隐含对象 共11个
1、与范围有关的隐含对象:
applicationScope sessionScope requestScope pageScope
2、与输入有关的隐含对象:
param 、paramValues