EL expressions provide the following operators^{[1]}:
Type 
Operators 
Description

Arithmetic

+, ^{[2]}, *, /, div, %, mod, ^{[3]}

 / and div are the same, while % and mod are the same.

Logical

and, &&, or, , not, !, empty

 The empty operator is a prefix operation that can be used to determine whether a value is null or empty, such as ${empty foo}.

Relational

==, eq, !=, ne, <, lt, >, gt, <=, ge, >=, le

 Comparisons can be made against other values, or against boolean, string, integer, or floating point literals.

Conditional

A ? B : C

It evaluate B or C, depending on the result of the evaluation of A.

Index

[]

To evaluate expra[exprb], evaluate expra into valuea and evaluate exprb into valueb. If either valuea or valueb is null, return null.
 If valuea is a Map, return valuea.get(valueb). If !valuea.containsKey(valueb), then return null.
 If valuea is a List or array, coerce valueb to int and return valuea.get(valueb) or Array.get(valuea, valueb), as appropriate. If the coercion couldn't be performed, an error is returned. If the get call returns an IndexOutOfBoundsException, null is returned. If the get call returns another exception, an error is returned.
 If valuea is a JavaBeans object, coerce valueb to String. If valueb is a readable property of valuea, then return the result of a get call. If the get method throws an exception, an error is returned.

Member

.

 Properties of variables are accessed using the . operator and can be nested arbitrarily.
 The value of a map can be accessed by using the . operator.

The relative precedence levels of operators from the highest to lowest, left to right are as follows:
 [] .
 ()^{[1]}
  ^{[2]} not ! empty
 * / div % mod
 +  ^{[3]}
 < > <= >= lt gt le ge
 == != eq ne
 && and
  or
 ? :
 ↑ Used to change the precedence of operators.
 ↑ unary
 ↑ binary
Version History