Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History  



1.1  Origin as JSTL  





1.2  JSP 2.0  





1.3  EL 2.1  





1.4  EL 3.0  





1.5  EL 4.0  







2 Features  





3 Examples  





4 Implementations  





5 See also  





6 References  





7 External links  














Jakarta Expression Language






Deutsch
Español
Français
Magyar
Português
Русский
Українська

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


The Jakarta Expression Language (EL; formerly Expression Language and Unified Expression Language) is a special purpose programming language mostly used in Jakarta EE web applications for embedding and evaluating expressions in web pages. The specification writers and expert groups of the Java EE web-tier technologies have worked on a unified expression language which was first included in the JSP 2.1 specification (JSR-245), and later specified by itself in JSR-341, part of Java EE 7.

History

[edit]

Origin as JSTL

[edit]

The expression language started out as part of the JavaServer Pages Standard Tag Library (JSTL) and was originally called SPEL (Simplest Possible Expression Language), then just Expression Language (EL). It was a scripting language which allowed access to Java components (JavaBeans) through JSP. Since JSP 2.0, it has been used inside JSP tags to separate Java code from JSP, and to allow easier access to Java components (than in Java code).

JSP 2.0

[edit]

Over the years, the expression language has evolved to include more advanced functionality and it was included in the JSP 2.0 specification. Scripting was made easier for web-content designers who have little or practically no knowledge of the core Java Language. This scripting language made JSP a scripting language in the true sense. Before EL, JSP consisted of some special tags like scriptlets, expressions etc. within which Java code was written explicitly. With EL the web-content designer needs only to know how to make proper calls to core Java methods.

EL was, both syntactically and semantically, similar to JavaScript expressions:

EL also liberated the programmer from having to know the particularities of how the values are actually accessed: object.property can mean (depending on what the objectis) either object.get("property")orobject.getProperty("property")orobject.getProperty() etc.

EL 2.1

[edit]

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 limitations were that its expressions were evaluated immediately, and the JSF components could not invoke methods on server-side objects. A more powerful language was created with the following new features:

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).

EL 3.0

[edit]

Version 3.0 of the expression language (the unified was no longer deemed necessary) was developed in a JSR independent of the JSP and JSF specifications in JSR-341. Some new features were added, most notably EL equivalents of Java 8 streams and lambda expressions.[1]

EL 4.0

[edit]

Version 4.0 was released in on 2020-10-07.[2] The API moved from the javax.el package to the jakarta.el package, as part of the transition from Java EE to Jakarta EE.

Features

[edit]

The 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:

Examples

[edit]

This shows a simple example of Unified EL being used within a JSTL "c:out" tag:

<c:out value="${myBean.myField}" />

An expression that calls a method with a parameter:

${myBean.addNewOrder('orderName')}

Implementations

[edit]

See also

[edit]

References

[edit]
  1. ^ "Standard Deviation: An Illustration of Expression Language 3.0 in Servlet Environment | Java.net". Archived from the original on 2013-09-27. Retrieved 2013-09-24.
  • ^ "Jakarta Expression Language 4.0.0". Archived from the original on 2021-01-09. Retrieved 2021-01-05.
  • [edit]
    Retrieved from "https://en.wikipedia.org/w/index.php?title=Jakarta_Expression_Language&oldid=1216953456"

    Categories: 
    Java (programming language)
    Scripting languages
    Hidden categories: 
    Articles with short description
    Short description is different from Wikidata
    Wikipedia articles needing context from November 2017
    All Wikipedia articles needing context
    All pages needing cleanup
     



    This page was last edited on 2 April 2024, at 23:03 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki