6.1 el表达式【杜老师】


(1)获取基本数据类型的数据

张三 15 18

(2)获取List集合中的数据

自信 自强 3

(3)获取Map集合中的数据

A班 B班

(4)获取JavaBean对象中的数据

${user.name}=杜老师、 ${user.age}=20

(5)EL运算

${empty str1} = true、 ${empty str2} = true 、 ${empty list} = true、 ${not empty list} = false
10+20 = 30 、 5>3 = true 、 5 gt 3 = true
(10>5) && (3<6) = true 、 (10>5) and (3<6) =true

(6)获取请求参数

用户名 username = 张三、 爱好 hobby[0] = 篮球、 爱好 hobby[1] =

(7)获取Cookie、获取pageContext内置对象

获取cookie JSESSIONID = 、 项目路径:/ch05、 请求方法:GET