Unified Expression Language

From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search

The Java Unified Expression Language is a special purpose programming language mostly used in Java web applications for embedding expressions into web pages. The Java specification writers and expert groups of the Java web-tier technologies have worked on a unified expression language which is now part of the JSP 2.1 specification (JSR-245). While the expression language is part of the JSP specification, it does not depend on the JSP specification and therefore it is available for a variety of technologies.

Contents

History

The expression language started out as part of the JavaServer Pages Standard Tag Library (JSTL) and was originally called SPEL (Simplest Possible Expression Language). It offered a simple way to access data objects. Over the years, the expression language has evolved to include more advanced functionality and it was included in the JSP 2.0 specification, because of the popularity and success in the community.

During the development of JSP 2.0, the JavaServer Faces technology was released which also needed an expression language, but the expression language defined in the JSP 2.0 specification didn't satisfy all the needs for development with JSF technology. The most obvious limitation is that its expressions are evaluated immediately. And also, the JSF components need a way to invoke methods on server-side objects. A more powerful language was created with the following new features:

  • Deferred expressions, which are not immediately evaluated
  • Expressions that can set as well as get data
  • Method expressions, which can invoke methods

The new expression language worked well for the purposes of JSF. But developers had problems when integrating the JSP EL with the JSF EL because of conflicts. Because of these incompatibilities, the unified expression language initiative was started to unify these expression languages. As of JSP 2.1, the expression languages of JSP 2.0 and JSF 1.1 have been merged into a single unified expression language (EL 2.1).

Features

The new unified EL is a union of the JSP and JSF expression languages. In addition to the features already available in the JSP EL, the unified EL has the following features:

  • Deferred evaluation
  • Support for expressions that can set values and expressions that can invoke methods
  • A pluggable API for resolving expressions

Implementations

JUEL is an open-source implementation of the Unified Expression Language. It is considered stable and feature complete and is licensed under the Apache License 2.0. JUEL is also suitable for use in non-JSP applications.

External links

Personal tools

Served in 0.065 secs.