The first article of the "Web Tier to Go With Java EE 5" series summarizes new features in JavaServer Pages (JSP) 2.1 technology. The maintenance release of the Java Standard Tag Library (JSTL) 1.2 also contributes significantly to the Java EE platform. First, JSTL is now part of the Java EE 5 platform. This means that you don't need to bundle JSTL with your web applications anymore. If you do have a copy of the JSTL library bundled with your application, the library provided by the container takes precedence. Second, the goal of the maintenance review of JSTL was to support the alignment work done on the JavaServer Pages (JSP) and JavaServer Faces 1.2 specifications, which the previous article in this series discusses. This article provides an overview of how JSTL 1.2 contributes to the alignment of the web-tier technologies. Alignment of JSTL Iteration Tags With JavaServer Faces Components
In the past, the use of JavaServer Faces components inside the JSTL
As you can see, the iteration variable
To solve this issue, the JavaServer Faces input component needs the iteration variable to be a deferred expression that refers to the proper object within the collection over which the tag is iterating. One example of such an object might be
Understanding how this works will give you some insight into the new unified expression language (EL) provided with JSP 2.1 technology.
As background information, you may want to read the article "Unified Expression Language," which provides a detailed description of the unified EL. In version 1.2, JSTL now defines the attribute
When a runtime expression is specified, it is evaluated immediately. For instance, in the example above,
The
Let's take a look at a simplified version of the tag handler implementation of
When developing applications with this feature, keep in mind that if the number of items referenced by the The
set Tag's Support for Deferred Values
In a fashion similar to the iteration tags, the
Just as is the case with the iteration tags, when a deferred-value expression is specified for the attribute, the tag handler adds a mapping for the
Following is a simplified outline of how the tag handler for the
Conclusion
Although the changes in this maintenance release of JSTL are relatively small, they are essential to the alignment of the JSP and JavaServer Faces technologies. If you have any questions or comments, please write or join us at the forum. Meanwhile, stay tuned for the next article in the series, which introduces the new features of JavaServer Faces technology. For More Information
Web Tier to Go With Java EE 5: Summary of New Features in JSP 2.1 Technology |
| |||||||||||||||||
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
|
| ||||||||||||