Sneak peek at EL

The entire next chapter is on EL, so we won’t go into details here. The only reason we’re covering it is because it’s yet another kind of element (with its own syntax) that goes in a JSP, and the exam objectives for this chapter include recognizing everything that can go into a JSP.

Note

An EL expression ALWAYS looks like this: ${something}

In other words, the expression is ALWAYS enclosed in curly braces, and prefixed with a dollar ($) sign.

This EL expression:

Please contact: ${applicationScope.mail}

Is the same as this Java expression:

Please contact: <%= application.getAttribute("mail") %>

Get Head First Servlets and JSP, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.