home view source


JSP 2.0 Basic EL


arithmetic
EL Expression Result
${3} 3
${5 + 2} 7
${1.5E4 + 1.4} 15001.4
${-4 - 2} -6
${7 * 2} 14
${6/8} 0.75
${6 div 8} 0.75
${3/0} Infinity
${10%3} 1
${10 mod 3} 1
${(1==2) ? 3 : 4} 4

Numeric
EL Expression Result
${1 < 2} true
${1 lt 2} true
${1 > (4/3)} false
${1 > (4/3)} false
${4.2 >= 3} true
${4.2 ge 3} true
${4 <= 3} false
${4 le 3} false
${10.0 == 10} true
${10.0 eq 10} true
${(10*10) != 100} false
${(10*10) ne 100} false

Alphabetic
EL Expression Result
${'a' < 'd'} true
${'foo' > 'zoo'} false
${'4' > 3} true