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

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat 7 Installation on Windows Systems

 JSP Scripting Elements

 Java Servlet Introduction

 JSP Implicit Objects

 Syntax of JSP Pages and JSP Documents

 JSP Application Session

 Managing Cookies in JSP Pages

 JavaBean Objects and "useBean" Action Elements

 Managing HTTP Response Header Lines

 Non-ASCII Characters Support in JSP Pages

 Performance of JSP Pages

EL (Expression Language)

 What is EL (Expression Language)?

 EL Expression Types and Usage

 Literal Data and Named Variables

Basic Operators and Operations

 Predefined Implicit Objects

 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)

 JSTL Core Library

 JSP Custom Tags

 JSP Java Tag Interface

 Custom Tag Attributes

 Multiple Tags Working Together

 File Upload Test Application

 Outdated Tutorials


 PDF Printing Version