JSP Tutorials - Herong's Tutorial Examples - Version 4.03, by Dr. Herong Yang
Basic Operators and Operations
This section describes operators and operations supported in EL expressions: arithmetic, relational, logical, conditional, empty and property operations.
EL expression supports all basic operators supported in Java with some exceptions:
Arithmetic operators: +, - (binary), *, / and div, % and mod, - (unary). Same as Java.
Logical operators: and, &&, or, ||, not, !. Same as Java. But "and", "or" and "not" are added to void using "&&", "||" and "!" in JSP pages.
Relational operators: ==, eq, !=, ne, <, lt, >, gt, <=, le, >=, ge. Comparisons can be made against other values, or against boolean, string, integer, or floating point literals. Same as Java. But "eq", "ne", "lt", "gt", "le", and "ge" are added to avoid using "==", "!=", "<", ">", "<=" and ">=" in JSP pages.
Special operators:
Last update: 2012.
Table of Contents
JSP (JavaServer Pages) Overview
Tomcat 7 Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
What is EL (Expression Language)?
Literal Data and Named Variables
►Basic Operators and Operations
Collection Elements and Object Properties
Expression Examples in Static Text
Expression Examples in Static Text - Result
EL Variables Are pageContext Attributes
Overview of JSTL (JSP Standard Tag Libraries)