Syntax and the three places it can appear

${ expression }                 <%-- directly in the page --%>
<%= expression %>            <%-- inside an expression tag --%>
attribute="<%= expression %>"   <%-- inside a tag attribute --%>
attribute="${ expression }"    <%-- same, preferred when EL is on --%>

The eleven implicit objects (slide 3)

ObjectFetches
pageScopethe attribute associated with the page object
requestScopethe attribute associated with the request object
sessionScopethe attribute associated with the session object
applicationScopethe attribute associated with the application object
paramthe single value of a request parameter
paramValuesthe array of values of a request parameter
headerthe single value of a request header
headerValuesthe array of values of a request header
cookiethe value of a cookie
initParama context parameter from web.xml
pageContextthe JSP pageContext object

Operators, and what they are called in words

PurposeSymbolicWord form
multiply, divide, remainder* / %div mod
add, subtract+ -—
less than / greater than< > <= >=lt gt le ge
equal, not equal== !=eq ne
and, or, not&& || !and or not
empty test, type test—empty instanceof
conditional?:—
index / named lookup[] .—

Precedence, highest first: [] () → - not ! empty → * / div % mod → + - → < <= > >= lt le gt ge → == != eq ne → && and → || or → ?:

Reserved words

eq ne lt le gt ge true false and or not instanceof div mod empty null

The four things EL will never do

← Back to the example index