Validating identified objects
The primary new feature of JSP 2.1 is the unified expression language (unified EL), which represents a union of the expression language offered by JSP 2.0 and the expression language created for Java Server Faces technology (see Chapter 10, Java Server Faces Technology) version 1.0.The expression language introduced in JSP 2.0 allows page authors to use simple expressions to dynamically read data from Java Beans components.Immediate evaluation expressions are always read-only value expressions.The expression shown above can only get the total price from the cart bean; it cannot set the total price.Immediate evaluation means that the JSP engine evaluates the expression and returns the result immediately when the page is first rendered.
This section gives an overview of the unified expression language features by explaining the following topics: The unified EL supports both immediate and deferred evaluation of expressions.
Other technologies using the unified EL might have different reasons for using deferred expressions.
All expressions using the syntax are evaluated immediately.
Value expressions can be further categorized into rvalue and lvalue expressions.
Rvalue expressions are those that can read data, but cannot write it. All expressions that are evaluated immediately use the property, gets its value, and the value is added to the response and rendered on the page.
As shown in this example, deferred evaluation expressions can be value expressions that can be used to both read and write data. Value expressions (both immediate and deferred) and method expressions are explained in the next section.