Posted on 2006-06-15 21:21
clingingboy 阅读(262)
评论(0) 编辑 收藏 所属分类:
JSP基础
看其本身自带的例子
1,
EL Expression | Result |
${1} | 1 |
${1 + 2} | 3 |
${1.2 + 2.3} | 3.5 |
${1.2E4 + 1.4} | 12001.4 |
${-4 - 2} | -6 |
${21 * 2} | 42 |
${3/4} | 0.75 |
${3 div 4} | 0.75 |
${3/0} | Infinity |
${10%4} | 2 |
${10 mod 4} | 2 |
${(1==2) ? 3 : 4} | 4 |
2,
EL Expression | Result |
${1 < 2} | true |
${1 lt 2} | true |
${1 > (4/2)} | false |
${1 > (4/2)} | false |
${4.0 >= 3} | true |
${4.0 ge 3} | true |
${4 <= 3} | false |
${4 le 3} | false |
${100.0 == 100} | true |
${100.0 eq 100} | true |
${(10*10) != 100} | false |
${(10*10) ne 100} | false |
3,
EL Expression | Result |
${'a' < 'b'} | true |
${'hip' > 'hit'} | false |
${'4' > 3} | true |
4,
EL Expression | Result |
${param.foo} | bar |
${param["foo"]} | bar |
${header["host"]} | 127.0.0.1:8080 |
${header["accept"]} | */* |
${header["user-agent"]} | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 2.0.50727) |
5,
EL Expression | Result |
${param["foo"]} | 0.2 |
${my:reverse(param["foo"])} | 2.0 |
${my:reverse(my:reverse(param["foo"]))} | 0.2 |
${my:countVowels(param["foo"])} | 0 |