From the course: Java EE 8 Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Expression language

Expression language - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

Expression language

- [Instructor] In JSP files and other Java EE technologies, we can use the expression language to access application data. Expression language, also known as EL, provides a simple syntax for creating expressions that resolve to objects or methods. This allows us to avoid using JSP scriptlets and declarations that mix our application logic and code within the markup. We've already used expression language several times to reference attributes in the request. So, for example, within our forEach tag, we're referencing the items attribute using the expression language, and here you can see the syntax. It's just a dollar sign and then curly braces and the attribute or object you'd like to reference within it. Now, you can also use this syntax with a pound sign. This causes the resolution of the attribute to be deferred until it's actually referenced. It's more common, though, to use the dollar sign syntax. Now, within the…

Contents