2024年4月8日发(作者:)
Java Unified Expression Language
Table of contents
1 Welcome to JUEL!.................................................................................................................................2
2 2
2.1 .3
2.2 3
2.2.1 4
2.2.2 5
2.2.3 6
2.3 7
2.3.1 8
2.3.2 .8
2.4 9
2.5 9
2.6 12
3 14
3.1 History 14
Copyright © 2006-2009 Odysseus Software GmbH. All rights reserved.
Java Unified Expression Language
1. Welcome to JUEL!
JUEL is an implementation of the Unified Expression Language (EL), specified as part of the JSP 2.1 standard
(JSR-245), which has been introduced in JEE5. Additionally, JUEL 2.2 implements the JSP 2.2 maintenance
release specification for full JEE6 compliance.
Motivation
Once, the EL started as part of JSTL. Then, the EL made its way into the JSP 2.0 standard. Now, though
part of JSP 2.1, the EL API has been separated into package
and all dependencies to the core
JSP classes have been removed.
In other words: the EL is ready for use in non-JSP applications!
Features
JUEL provides a lightweight and efficient implementation of the Unified Expression Language.
•High Performance – Parsing expressions is certainly the expected performance bottleneck. JUEL uses a
hand-coded parser which is up to 10 times faster than the previously used (javacc) generated parser!
Once built, expression trees are evaluated at highest speed.
•Pluggable Cache – Even if JUELs parser is fast, parsing expressions is relative expensive. Therefore, it's
best to parse an expression string only once. JUEL provides a default caching mechanism which should
be sufficient in most cases. However, JUEL allows to plug in your own cache easily.
•Small Footprint – JUEL has been carefully designed to minimize memory usage as well as code size.
•Method Invocations – JUEL supports method invocations as in
${s('[0-9]+')}
. Methods are
resolved and invoked using the EL's resolver mechanism. As of JUEL 2.2, method invocations are enabled
by default.
•VarArg Calls – JUEL supports Java 5 VarArgs in function and method invocations. E.g., binding
(String, )
to function
format
allows for
${format('Hey %s','Joe')}
. As of
JUEL 2.2, VarArgs are enabled by default.
•Pluggable – JUEL can be configured to be transparently detected as EL implementation by a Java runtime
environment or JEE application server. Using JUEL does not require an application to explicitly reference
any of the JUEL specific implementation classes.
Status
JUEL is considered production stable. The code is well tested (80% coverage) and feature complete.
Availability
JUEL is licensed under the Apache License 2.0.
Requirements
JUEL requires Java 5 or later.
2. JUEL Guide
This guide gives a brief introduction to JUEL. However, this is not an EL tutorial. Before using JUEL,
we strongly recommend to get familiar with the Unified EL basics by taking a look at the specification
document, which is available here.
The JUEL guide divides into the following sections:
Copyright © 2006-2009 Odysseus Software GmbH. All rights reserved.
2
发布评论