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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.