March 2008
Intermediate to advanced
911 pages
20h 31m
English
Yes, just in time to save us, the JSP Expression Language (EL) was added to the JSP 2.0 spec, releasing us from the tyranny of scripting.
Look how beautifully simple our JSP is now...
JSP code without scripting, using EL
<html><body>
Dog's name is: ${person.dog.name}
</body></html>This is it! We didn’t even declare what person means... it just knows.
EL makes it easy to print nested properties... in other words, properties of properties!
This:
${person.dog.name}Replaces this:
<%= ((foo.Person) request.getAttribute("person")).getDog().getName() %>You don’t need to know EVERYTHING about EL.
The exam doesn’t expect you to be a complete EL being. Everything you might typically use, or be tested on, is covered in the next few pages. So, if you want to study the EL spec, knock yourself out. Just so you’re clear that WE didn’t tell you to do that.
Read now
Unlock full access