O'Reilly logo

Head First Servlets and JSP, 2nd Edition by Bert Bates, Bryan Basham, Kathy Sierra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deconstructing the JSP Expression Language (EL)

The syntax and range of the language are dirt simple. The tricky part is that some of EL looks like Java, but behaves differently. You’ll see when we get to the [] operator in a moment. So you’ll find things that wouldn’t work in Java but will work in EL, and vice-versa. Just don’t try to map Java language/syntax rules onto EL, and you’ll be fine. For the next few pages, think of EL as a way to access Java objects without using Java.

EL expressions are ALWAYS within curly braces, and prefixed with the dollar sign

${person.name}

Note

The first named variable in the expression is either an implicit object or an attribute.

image with no caption

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required