Home > Article > Web Front-end > How to use commonly used el expressions
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false"%>
Generally add this isELIgnored="false" before it can be used${}
##1.Constant
There must be no spaces between $ and {}, and there can be spaces in {}, such as: ${user.username }
Boolean type: ${true}
## Integer type: ${10}
## Floating point type: ${10.5}
String type: ${"username"}
Empty type: ${null} page does not display
## 2. Four arithmetic operations
EL arithmetic operators: +, -, *,/or p, % or mod
EL relational operator: == or eq,! =or ne, b28458baa78c1fbc0be5df8787cd6df2 or gt, e3ed6ed1834a122f8af0ae47d783c685 =or ge
# # EL logical operators: && or and, || or or,! Or not
## Other operations: ${ A == a ? B : C}empty (unary operator): Used to determine whether the value is null (empty), return true, otherwise return false.
## ${empty A} ${not empty.A}
ELWhen operating on the variables in the expression, it Use pageContext.findAttribute("") to find variables
Search from the page, request, session, and application domains in sequence
If the value is not found in any of these four fields. Just return null, or you can specify to search for
in a specific field. Format:
${pageScope.param}
##${requestScope.param}
${sessionScope.param} ${applicationScope.param}
The above is the detailed content of How to use commonly used el expressions. For more information, please follow other related articles on the PHP Chinese website!