JSTL Early Access Beware — API and Tags may/will change support   development   comments to JSR052 EG
JSTL Examples     IntroductionEL Support ConditionalsIteratorsImportI18N & FormattingXMLSQLEcmaScriptMisc.

EcmaScript Expression Language Examples

In EA2, EcmaScript is the default Expression Language. Instructions below were necessary only with EA1 when there were no default EL (and one had to be explicitely defined).

In order to use EcmaScript, make sure to set the context parameter to the EcmaScript expression language in your web.xml file as follows:

    <context-param>
        <param-name>javax.servlet.jsp.jstl.temp.ExpressionEvaluatorClass</param-name>
        <param-value>org.apache.taglibs.standard.lang.javascript.JavascriptExpressionEvaluator</param-value>
    </context-param>

Arithmetic Operators  

Arithmetic Operators perform various operations on either numeric or string operands.

Comparison Operators  

Comparison Operators compare values for equality and identity.

String Operators  

Comparison Operators produce special effects when used with Strings.

String Support  

The EcmaScript String Object type has many useful methods for operating on string values.

Logical Operators  

Logical Operators are used to perform boolean algebra.

Bitwise Operators  

Bitwise Operators perform boolean algebra on individual bits or are used to shift bits.

Assignment Operators  

Assignment Operators are shortcuts for combining assignment with another operation.

Conditional Operator  

Conditional Operator is a shortcut for an if/else statement.

Array and List Access  

Individual elements of an array or List can be accessed using the [] notation.

Property Access  

Elements of an object can be accessed using the . notation.

Map Access  

Map entries can be accessed using the [] notation, or using the Map.Entry class.

Special Objects  

In the context of JSTL, some special predefined objects are made available.

Function Call  

Functions can be invoked using the () operator.

JSTL Early Access Beware — API and Tags may/will change support    development   comments to JSR052 EG